public void UsingFluentVoidPredicate() { //Arrange TwoColumnsTableFixture source2Columns = new TwoColumnsTableFixture("SourceMultipleLinks"); source2Columns.InsertTestData(); source2Columns.InsertTestDataSet2(); TwoColumnsTableFixture dest2Columns = new TwoColumnsTableFixture("DestinationMultipleLinks"); DBSource <MySimpleRow> source = new DBSource <MySimpleRow>(SqlConnection, "SourceMultipleLinks"); DBDestination <MySimpleRow> dest = new DBDestination <MySimpleRow>(SqlConnection, "DestinationMultipleLinks"); RowTransformation <MySimpleRow> trans1 = new RowTransformation <MySimpleRow>(row => row); //Act source.LinkTo(trans1, row => row.Col1 < 4, row => row.Col1 >= 4).LinkTo(dest); Task sourceT = source.ExecuteAsync(); Task destT = dest.Completion(); //Assert sourceT.Wait(); destT.Wait(); dest2Columns.AssertTestData(); }
public void Linking3Transformations() { //Arrange TwoColumnsTableFixture source2Columns = new TwoColumnsTableFixture("SourceMultipleLinks"); source2Columns.InsertTestData(); TwoColumnsTableFixture dest2Columns = new TwoColumnsTableFixture("DestinationMultipleLinks"); DBSource source = new DBSource(SqlConnection, "SourceMultipleLinks"); DBDestination dest = new DBDestination(SqlConnection, "DestinationMultipleLinks"); RowTransformation trans1 = new RowTransformation(row => row); RowTransformation trans2 = new RowTransformation(row => row); RowTransformation trans3 = new RowTransformation(row => row); //Act source.LinkTo(trans1).LinkTo(trans2).LinkTo(trans3).LinkTo(dest); Task sourceT = source.ExecuteAsync(); Task destT = dest.Completion(); //Assert sourceT.Wait(); destT.Wait(); dest2Columns.AssertTestData(); }