public void TestGetSetMapsShouldGetSetMaps() { var map = new SourceMap(); var maps = new List <SourceMap> { map }; _source.SetMaps(maps); var result = _source.GetMaps(); Assert.That(result, Contains.Item(map)); }
private void Import(CsvFileSource source) { _eventBus.Raise(new SourceImportingEvent()); _repository.SetSource(source); var dataTable = _dataAdapter.GetTable(source); var maps = source.GetMaps(); var basePath = Path.GetDirectoryName(source.FilePath); var columnAggregates = maps .Select(p => CreateColumnAggregate(p, basePath)) .ToList(); CreateRows(dataTable, columnAggregates); CreateColumns(maps); _eventBus.Raise(new SourceImportedEvent()); }
public void TestExecuteShouldUpdateSourceMaps() { _handler.Execute(new UpdateCsvFileSourceCommand(_filePath)); Assert.That(_source.GetMaps(), Has.Member(_map)); }