Hello,
According to the JustMock documentation, to validate a method on the mock was called it should be done like so:
[TestMethod]
public void ShouldThrowExceptionWhenMustBeCalledSetupIsNeverInvoked()
{
// Arrange
var foo = new Foo();
Mock.Arrange(() => foo.Execute()).MustBeCalled();
// Assert
Assert.Throws<AssertFailedException>(() => Mock.Assert(foo));
}
When I do that, the application fails to compile saying the type AssertFailedException does not exist, even though I have the using statement for the Telerik.JustMock assembly at the top of my file. If I try to fully qualify it like so:
Assert.Throws<Telerik.JustMock.Xunit.AssertFailedException>
I get the same message for the "Xunit" namespace.
I know that the type should exist since when I run the test asserting a different type of Exception, the test fails saying it expects an exception of type Telerik.JustMock.Xunit.AssertFailedException.
I am attaching a couple of images that illustrate the problem.
Thank you.