示例#1
0
        public void return_level_attribute_without_different_data_results_in_not_marked_as_modified()
        {
            var dectector = new MethodILChangeDetector();

            Assert.IsFalse(dectector.AreDifferentIL(assembly.GetMethodDefinition <TestMethods>("HasReturnAttributeWithData"),
                                                    assembly.GetMethodDefinition <TestMethods>("HasReturnAttributeWithData")));
        }
示例#2
0
        public void paramter_level_attribute_with_different_data_results_in_marked_as_modified()
        {
            var dectector = new MethodILChangeDetector();

            Assert.IsTrue(dectector.AreDifferentIL(assembly.GetMethodDefinition <TestMethods>("HasParameterAttributeWithData"),
                                                   assembly.GetMethodDefinition <TestMethods>("HasParameterAttributeWithDifferentData")));
        }
示例#3
0
        public void return_level_attribute_remove_results_in_marked_as_modified()
        {
            var dectector = new MethodILChangeDetector();

            Assert.IsTrue(dectector.AreDifferentIL(assembly.GetMethodDefinition <TestMethods>("HasReturnAttribute"),
                                                   assembly.GetMethodDefinition <TestMethods>("HasNoReturnAttribute")));
        }
示例#4
0
        public void parameter_level_attribute_on_both_results_in_not_marked_as_modified()
        {
            var dectector = new MethodILChangeDetector();

            Assert.IsFalse(dectector.AreDifferentIL(assembly.GetMethodDefinition <TestMethods>("HasParameterAttribute"),
                                                    assembly.GetMethodDefinition <TestMethods>("HasParameterAttribute")));
        }
示例#5
0
        public void methods_that_are_different_show_up_as_different()
        {
            var dectector = new MethodILChangeDetector();

            Assert.IsTrue(dectector.AreDifferentIL(assembly.GetMethodDefinition <TestMethods>("Instance1"),
                                                   assembly.GetMethodDefinition <TestMethods>("Instance2")));
        }
示例#6
0
 public void methods_that_only_have_different_string_data_are_different()
 {
     var dectector = new MethodILChangeDetector();
     Assert.IsTrue(dectector.AreDifferentIL(assembly.GetMethodDefinition<TestMethods>("Instance2"),
                                            assembly.GetMethodDefinition<TestMethods>("StringDifferentAsInstance2")));
 }
示例#7
0
 public void methods_that_are_the_same_are_not_different()
 {
     var dectector = new MethodILChangeDetector();
     Assert.IsFalse(dectector.AreDifferentIL(assembly.GetMethodDefinition<TestMethods>("Instance2"),
                                            assembly.GetMethodDefinition<TestMethods>("SameAsInstance2")));
 }
示例#8
0
 public void methods_that_are_different_show_up_as_different()
 {
     var dectector = new MethodILChangeDetector();
     Assert.IsTrue(dectector.AreDifferentIL(assembly.GetMethodDefinition<TestMethods>("Instance1"),
                                            assembly.GetMethodDefinition<TestMethods>("Instance2")));
 }