public async Task Execute_EquivalentDatasets_NoRowsReturned(ColumnMatchType columnMatchType) { var primaryDataset = MockDatatable1; primaryDataset.Rows.Add(MockFirstName1, MockLastName1, MockEmail1); primaryDataset.Rows.Add(MockFirstName2, MockLastName2, MockEmail2); var comparisonDataset = MockDatatable2; comparisonDataset.Rows.Add(MockFirstName1, MockLastName1, MockEmail1); comparisonDataset.Rows.Add(MockFirstName2, MockLastName2, MockEmail2); _datasetPool.InsertOrReplace(TestPrimaryDatasetName, primaryDataset); _datasetPool.InsertOrReplace(TestComparisonDatasetName, comparisonDataset); _ = await _sut.Execute(new GetUniqueRowsStepParameters { PrimaryDatasetName = TestPrimaryDatasetName, ComparisonDatasetName = TestComparisonDatasetName, OutputDatasetName = TestOutputDatasetName, ComparisonColumns = new[] { new ColumnMapping("FirstName", "FirstName"), new ColumnMapping("LastName", "Surname"), new ColumnMapping("Email", "WorkEmail"), }, ColumnMatchType = columnMatchType, }, CancellationToken.None); var result = _datasetPool.GetDataSet(TestOutputDatasetName); Assert.AreEqual(3, result.Columns.Count); Assert.AreEqual(0, result.Rows.Count); }
public async Task Execute_BothInputDatasetsEmpty_EmptyDatasetReturned(ColumnMatchType columnMatchType) { _datasetPool.InsertOrReplace(TestPrimaryDatasetName, MockDatatable1); _datasetPool.InsertOrReplace(TestComparisonDatasetName, MockDatatable2); _ = await _sut.Execute(new GetUniqueRowsStepParameters { PrimaryDatasetName = TestPrimaryDatasetName, ComparisonDatasetName = TestComparisonDatasetName, OutputDatasetName = TestOutputDatasetName, ComparisonColumns = new[] { new ColumnMapping("FirstName", "FirstName"), new ColumnMapping("LastName", "Surname"), new ColumnMapping("Email", "WorkEmail"), }, ColumnMatchType = columnMatchType, }, CancellationToken.None); var result = _datasetPool.GetDataSet(TestOutputDatasetName); Assert.IsNotNull(result); Assert.AreEqual(3, result.Columns.Count); Assert.AreEqual(0, result.Rows.Count); }