public void FindModifiedMethods_should_return_method_one_as_changed_due_to_code_change() { var newMethodName = "Method1"; var newClassName = "NewClass"; AssemblyDiffer differ = new AssemblyDiffer(); IEnumerable<ChangedMethod> newMethods = differ.FindModifiedMethods(assemblyOne.Path, assemblyTwo.Path); Assert.That(newMethods.Count(), Is.EqualTo(1)); Assert.That(newMethods.First().ClassName, Is.EqualTo(newClassName)); Assert.That(newMethods.First().MethodName, Is.EqualTo(newMethodName)); Assert.That(newMethods.First().ChangeReason, Is.EqualTo(ChangeReason.New)); }
public void New_methods_have_changereason_set_to_true() { AssemblyDiffer differ = new AssemblyDiffer(); IEnumerable<ChangedMethod> newMethods = differ.FindModifiedMethods(assemblyOne.Path, assemblyTwo.Path); Assert.That(newMethods.First().ChangeReason, Is.EqualTo(ChangeReason.New)); }
public void FindModifiedMethods_should_return_the_the_additional_method_added_to_assembly2() { var newMethodName = "Method2"; AssemblyDiffer differ = new AssemblyDiffer(); IEnumerable<ChangedMethod> newMethods = differ.FindModifiedMethods(assemblyOne.Path, assemblyTwo.Path); Assert.That(newMethods.Count(), Is.EqualTo(1)); Assert.That(newMethods.First().MethodName, Is.EqualTo(newMethodName)); }
public void New_methods_have_correct_assembly_name() { AssemblyDiffer differ = new AssemblyDiffer(); IEnumerable<ChangedMethod> newMethods = differ.FindModifiedMethods(assemblyOne.Path, assemblyTwo.Path); Assert.That(newMethods.First().AssemblyName, Is.EqualTo("TestAssembly2.dll")); }
private TestExecutionResults ProcessNewlyBuiltAssembly() { AssemblyDiffer differ = new AssemblyDiffer(); var findModifiedMethods = differ.FindModifiedMethods(oldAssembly, newAssembly); TestFinder finder = new TestFinder(); var findUsagesViaTests = finder.FindUsagesViaTests(testAssembly); ChangedMethodsFilter filter = new ChangedMethodsFilter(); var findUnitTestsAffectedByChanges = filter.FindUnitTestsAffectedByChanges(findModifiedMethods, findUsagesViaTests); GallioTestRunner runner = new GallioTestRunner(); var testExecutionResults = runner.Execute(findUnitTestsAffectedByChanges); MoveAssemblyToOld(oldOutDir, outDir); return testExecutionResults; }