Completed
Last Updated: 10 Jan 2014 09:04 by ADMIN
Micah
Created on: 02 Jan 2014 00:13
Type: Bug Report
0
Mock.Arrange is deleting previous arrangements.
1. Load the attached project in Visual Studio 2013.
2. Update the NuGet packages (NUnit).
3. Update the reference to JustMock to point to the correct path to a retail version of Telerik.JustMock.dll.
4. Run tests in NUnit runner (or any other runner that will run them in the same process/sequentially.
5. --> Notice that the first TestCase will pass, the second will fail.
6. Run the two test cases separately.
7. --> Notice that they both pass.
8. Remove the reference to Telerik.JustMock.dll.
9. Use NuGet to get the latest JustMock Lite.
10. Run the tests again.
11. --> Notice that they both pass.

This appears to be a bug with JustMock (retail) 2013.3.1119.2.  The bug does not reproduce when using JustMock Lite from NuGet.

If you drop into a debugger and step through both tests in a row you see the following behavior:
1. When the first test is started (after SetUp has been called) FlagA is correctly set to true and FlagB is defaulted to false.
2. When you step over the Mock.Arrange, FlagA is still true and FlagB is set to the value of input (order of running tests doesn't appear to matter, second always fails).
3. When the second test starts (after SetUp has been called again) Flag A is correctly set to true and FlagB is defaulted to false.
4. When you step over the Mock.Arrange, FlagB is set to the value of input but FlagA has been reverted to default!

If you add several other properties to the interface they will all be reset to default (no matter how many you arrange) when the second test executes the Mock.Arrange.

This bug reproduces without the JustMock profiler attached, and also with the profiler attached.

The version of JustMock Lite that was tested against is 2014.1.1217.4.  When I run the Telerik Control Panel I am not prompted to update my version of JustMock beyond 2013.3.1119.2 (perhaps this bug is already fixed and I just need to figure out how to upgrade).
Attached Files:
2 comments
ADMIN
Vladi
Posted on: 03 Jan 2014 13:58
Hi Micah,

Just to let you know that we've fixed the issue and it'll be part of our next public release in a week or two.
ADMIN
Vladi
Posted on: 02 Jan 2014 15:18
Hi Micah,

I'm sorry for the caused inconvenience. Indeed there's an issue and we'll work to fix it as soon as possible and add it in our next public version. As a small sign of our appreciation for your help, I've given you some Telerik points. You can review your Telerik account to check them.

Thanks again!