public void Test_Correct_ExtractedColumns_Created() { // arrange var extractColumn = new ExtractColumn(src.Object, dest.Object, rules.Object); dest.Setup(x => x.GetIdLastInsert()).Returns(445); // act extractColumn.PerformRefactor(); // assert var extractedColumns = extractColumn.ForeignKeyResolver; Assert.AreEqual(445, extractedColumns.GetForeignKey("extracted_table", "column_value")); }
public void Test_Correct_Insert_Query_When_Extracting_Column() { // arrange var extractColumn = new ExtractColumn(src.Object, dest.Object, rules.Object); // act extractColumn.PerformRefactor(); // assert dest.Verify(x => x.InsertRecord( "extracted_table", new Dictionary<string, object> {{"name", "column_value"}})); }
public void TestInsertExtractedColumns() { var rules = new AccountConversionRules(); var extractColumn = new ExtractColumn(this.src, this.dest, rules); var count = extractColumn.PerformRefactor(); }