File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/Dataverse.ConfigurationMigrationTool/Console.Tests/Features/Import/Commands Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 4
4
using Dataverse . ConfigurationMigrationTool . Console . Features . Shared ;
5
5
using Dataverse . ConfigurationMigrationTool . Console . Tests . Extensions ;
6
6
using Microsoft . Extensions . Logging ;
7
+ using Microsoft . Extensions . Options ;
7
8
using NSubstitute ;
8
9
using Shouldly ;
9
10
@@ -17,17 +18,25 @@ public class ImportCommandsTest
17
18
private readonly ImportCommands _importCommands ;
18
19
const string DataFilePath = "data.json" ;
19
20
const string SchemaFilePath = "schema.json" ;
21
+ private ImportCommandOptions _options => new ( )
22
+ {
23
+ data = DataFilePath ,
24
+ schema = SchemaFilePath
25
+ } ;
20
26
21
27
public ImportCommandsTest ( )
22
28
{
23
29
_logger = Substitute . For < ILogger < ImportCommands > > ( ) ;
24
30
_importDataProvider = Substitute . For < IImportDataProvider > ( ) ;
25
31
_schemaValidator = Substitute . For < IValidator < ImportSchema > > ( ) ;
26
32
_importDataService = Substitute . For < IImportTaskProcessorService > ( ) ;
33
+ var options = Substitute . For < IOptions < ImportCommandOptions > > ( ) ;
34
+ options . Value . Returns ( _options ) ;
27
35
_importCommands = new ImportCommands ( _logger ,
28
36
_importDataProvider ,
29
37
_schemaValidator ,
30
- _importDataService ) ;
38
+ _importDataService ,
39
+ options ) ;
31
40
}
32
41
33
42
[ Fact ]
You can’t perform that action at this time.
0 commit comments