I have a mocked class which has a bool property BoolProperty.
I have a class under test with a method under test which first sets BoolProperty to true, and then to false.
I wish to set up an arrangement which tests that these two calls are made in the correct order, which I have done as follows:
mockedClass.ArrangeSet(x => x.BoolProperty = true).InSequence();
mockedClass.ArrangeSet(x => x.BoolProperty = false).InSequence();
This passes the test fine. However, if I reverse the order:
mockedClass.ArrangeSet(x => x.BoolProperty = false).InSequence();
mockedClass.ArrangeSet(x => x.BoolProperty = true).InSequence();
this *also* passes.
Shouldn't this second arrangement cause the test to fail?
I am using JustMock 2014.1.1424.1
I have a class under test with a method under test which first sets BoolProperty to true, and then to false.
I wish to set up an arrangement which tests that these two calls are made in the correct order, which I have done as follows:
mockedClass.ArrangeSet(x => x.BoolProperty = true).InSequence();
mockedClass.ArrangeSet(x => x.BoolProperty = false).InSequence();
This passes the test fine. However, if I reverse the order:
mockedClass.ArrangeSet(x => x.BoolProperty = false).InSequence();
mockedClass.ArrangeSet(x => x.BoolProperty = true).InSequence();
this *also* passes.
Shouldn't this second arrangement cause the test to fail?
I am using JustMock 2014.1.1424.1