-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrate tests repo and improve test coverage (#28)
Integrate the tests repo with the main repository and take the opportunity to streamline setup and improve test coverage. - Integrate the tests repo - Improve test coverage - Streamline test setup with AutoFixture - Implement `System.IO.Abstractions` for FileSystem mocking - Refactor where needed to improve testability
- Loading branch information
1 parent
7b8a1ab
commit af58f8e
Showing
29 changed files
with
1,273 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System.Collections.Generic; | ||
using DNTScanner.Core; | ||
using Mosey.Models; | ||
|
||
namespace Mosey.Services.Imaging | ||
{ | ||
/// <summary> | ||
/// Provides access to the WIA driver devices via DNTScanner.Core | ||
/// </summary> | ||
public interface ISystemDevices | ||
{ | ||
/// <summary> | ||
/// Retrieve image(s) from a scanner. | ||
/// </summary> | ||
/// <param name="settings">A <see cref="ScannerSettings"/> instance representing a physical device</param> | ||
/// <param name="config">Device settings used when capturing an image</param> | ||
/// <param name="format">The image format used internally for storing the image</param> | ||
/// <returns>A list of retrieved images as byte arrays, in <paramref name="format"/></returns> | ||
IEnumerable<byte[]> PerformScan(ScannerSettings settings, IImagingDeviceConfig config, ScanningDevice.ImageFormat format); | ||
|
||
/// <inheritdoc cref="PerformScan(ScannerSettings, IImagingDeviceConfig, ScanningDevice.ImageFormat)"/> | ||
/// <param name="connectRetries">The number of attempts to try connecting to the WIA driver, after <paramref name="delay"/></param> | ||
/// <param name="delay">The time in millseconds between <paramref name="connectRetries"/> attempts</param> | ||
IEnumerable<byte[]> PerformScan(ScannerSettings settings, IImagingDeviceConfig config, ScanningDevice.ImageFormat format, int connectRetries, int delay); | ||
|
||
/// <summary> | ||
/// Lists the static properties of scanners connected to the system. | ||
/// <para/> | ||
/// Use the <see cref="ScannerDevices"/> function to retrieve full device instances. | ||
/// </summary> | ||
/// <remarks> | ||
/// Static device properties are limited, but can be retrieved without establishing a connection to the device. | ||
/// </remarks> | ||
/// <returns>A list of the static device properties</returns> | ||
public IList<IDictionary<string, object>> ScannerProperties(); | ||
|
||
/// <inheritdoc cref="ScannerProperties"/> | ||
/// <param name="connectRetries">The number of retry attempts allowed if connecting to the WIA driver was unsuccessful</param> | ||
public IList<IDictionary<string, object>> ScannerProperties(int connectRetries); | ||
|
||
/// <summary> | ||
/// A collection of <see cref="ScannerSettings"/> representing physical devices connected to the system. | ||
/// </summary> | ||
/// <returns>A collection of <see cref="ScannerSettings"/> representing physical devices connected to the system.</returns> | ||
public IEnumerable<ScannerSettings> ScannerSettings(); | ||
|
||
/// <inheritdoc cref="ScannerSettings"/> | ||
/// <param name="connectRetries">The number of retry attempts allowed if connecting to the WIA driver was unsuccessful</param> | ||
public IEnumerable<ScannerSettings> ScannerSettings(int connectRetries); | ||
} | ||
} |
Oops, something went wrong.