Hello,
I've started to play around with JustMock and so far I really like the API and the features. I've found one issue so far that's preventing me from switching over to JustMock, though. ArrangeSet with MustBeCalled does not appear to be working. Here's a code sample:
The TestFoo test passes even though the mockFoo.A set accessor was not called. If I uncomment the mockFoo.A = 2 line, it still succeeds even though the value (2) doesn't match what was specified in the ArrangeSet Action (1).
Is this a known issue or am I missing something? This test was run in .NET 4.0 under VS2010.
Thanks,
Jack L
I've started to play around with JustMock and so far I really like the API and the features. I've found one issue so far that's preventing me from switching over to JustMock, though. ArrangeSet with MustBeCalled does not appear to be working. Here's a code sample:
[TestClass] |
public class Test |
{ |
[TestMethod] |
public void TestFoo() |
{ |
var mockFoo = Mock.Create<Foo>(); |
Mock.ArrangeSet(() => mockFoo.A = 1).MustBeCalled(); |
//mockFoo.A = 2; |
Mock.Assert(mockFoo); |
} |
} |
public class Foo |
{ |
public int A { get; set; } |
} |
The TestFoo test passes even though the mockFoo.A set accessor was not called. If I uncomment the mockFoo.A = 2 line, it still succeeds even though the value (2) doesn't match what was specified in the ArrangeSet Action (1).
Is this a known issue or am I missing something? This test was run in .NET 4.0 under VS2010.
Thanks,
Jack L