public void Setup() { _fileSystemFake = new FileSystemFake(); _configFake = new ConfigFake { DatacardsDirectory = DataCardsDirectory }; _datacardWriter = new DatacardWriter(new DatacardPath(_configFake), _fileSystemFake, new Serializer()); }
private Datacard CreateDatacard() { var datacardPath = new DatacardPath(_configFake); var datacardWriter = new DatacardWriter(datacardPath, _fileSystemFake, _serializer); var datacardExtractor = new DatacardExtractor(datacardPath, _fileSystemFake); var datacardStorage = new DatacardStorage(datacardPath, datacardWriter, datacardExtractor, _pluginFactory, _fileSystemFake, _serializer); var datacardPluginFinder = new DatacardPluginFinder(); var datacardMetadataReader = new DatacardMetadataReader(); var datacardTotalsCalculator = new DatacardTotalsCalculator(new FieldTotalsCalculator()); return(new Datacard(datacardStorage, datacardPluginFinder, datacardMetadataReader, datacardTotalsCalculator, new FieldBoundaryReader())); }
public void Setup() { _configFake = new ConfigFake { DatacardsDirectory = Path.GetTempPath() }; _fileSystemFake = new FileSystemFake(); _serializer = new Serializer(); var datacardPath = new DatacardPath(_configFake); var datacardWriter = new DatacardWriter(datacardPath, _fileSystemFake, _serializer); var datacardExtractor = new DatacardExtractor(datacardPath, _fileSystemFake); var pluginFactoryFake = new PluginFactoryFake(); _datacardStorage = new DatacardStorage(datacardPath, datacardWriter, datacardExtractor, pluginFactoryFake, _fileSystemFake, _serializer); }