예제 #1
0
        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"));
        }
예제 #2
0
        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"}}));
        }
예제 #3
0
 public void TestInsertExtractedColumns()
 {
     var rules = new AccountConversionRules();
     var extractColumn = new ExtractColumn(this.src, this.dest, rules);
     var count = extractColumn.PerformRefactor();
 }