Here's another impact detection issue I came across.
The way Moq creates mocks may make it difficult/impossible to detect this case but I wanted to make sure you were aware of it regardless.
Create a project with Machine.Specifications, Machine.Specifications.Should, and Moq Nuget packages. Enable NCrunch with run impacted tests automatically.
Add the following test:
Code:
public class test {
It should_create_mock = () => {
Mock.Of<Foo>().ShouldNotBeNull();
};
}
public class Foo {
//protected Foo() {
//}
public Foo(String value) {
}
}
NCrunch will correctly detect that the test fails because Moq cannot create an instance of the class because it does not have a no argument constructor (Castle.DynamicProxy.InvalidProxyConstructorArgumentsException).
Now uncomment the no argument constructor in Foo. Impact detection will not detect that the code under test has changed and that the test will now succeed (manually running the test will correctly detect that it now passes).
After the latest fixes I'm really happy overall with the way impact detection works and get a lot of value out of it. Thanks for all your hard work.