예제 #1
0
        public void VerifyOnRecordThrowsTwoMockTypes()
        {
            MockRepository  mocks       = new MockRepository();
            RecordMockState recordState = new RecordMockState(new ProxyInstance(mocks, typeof(IAnimal), typeof(IDemo)), mocks);

            Assert.Throws <InvalidOperationException>(
                "This action is invalid when the mock object {Rhino.Mocks.Tests.IAnimal, Rhino.Mocks.Tests.IDemo} is in record state.",
                () => recordState.Verify());
        }
예제 #2
0
        public void VerifyOnRecordThrows()
        {
            MockRepository  mocks       = new MockRepository();
            RecordMockState recordState = new RecordMockState(new ProxyInstance(mocks), mocks);

            Assert.Throws <InvalidOperationException>(
                "This action is invalid when the mock object is in record state.",
                () => recordState.Verify());
        }
예제 #3
0
 public void VerifyOnRecordThrowsTwoMockTypes()
 {
     MockRepository mocks = new MockRepository();
     RecordMockState recordState = new RecordMockState(new ProxyInstance(mocks, typeof(IAnimal), typeof(IDemo)), mocks);
     recordState.Verify();
 }
예제 #4
0
 public void VerifyOnRecordThrows()
 {
     MockRepository mocks = new MockRepository();
     RecordMockState recordState = new RecordMockState(new ProxyInstance(mocks), mocks);
     recordState.Verify();
 }
 public void VerifyOnRecordThrowsTwoMockTypes()
 {
     MockRepository mocks = new MockRepository();
     RecordMockState recordState = new RecordMockState(new ProxyInstance(mocks, typeof(IAnimal), typeof(IDemo)), mocks);
     string expectedMessage="This action is invalid when the mock object {Rhino.Mocks.Tests.IAnimal, Rhino.Mocks.Tests.IDemo} is in record state.";
     InvalidOperationException ex = Assert.Throws<InvalidOperationException>(
         () => recordState.Verify());
     Assert.Equal(expectedMessage, ex.Message);
 }
 public void VerifyOnRecordThrows()
 {
     MockRepository mocks = new MockRepository();
     RecordMockState recordState = new RecordMockState(new ProxyInstance(mocks), mocks);
     string expectedMessage="This action is invalid when the mock object is in record state.";
     InvalidOperationException ex = Assert.Throws<InvalidOperationException>(
         () => recordState.Verify());
     Assert.Equal(expectedMessage, ex.Message);
 }
예제 #7
0
 public void VerifyOnRecordThrowsOneMockType()
 {
     MockRepository mocks = new MockRepository();
     RecordMockState recordState = new RecordMockState(new ProxyInstance(mocks, typeof(IAnimal)), mocks);
     Assert.Throws<InvalidOperationException>(
         "This action is invalid when the mock object {Rhino.Mocks.Tests.IAnimal} is in record state.",
         () => recordState.Verify());
 }
예제 #8
0
 public void VerifyOnRecordThrows()
 {
     MockRepository mocks = new MockRepository();
     RecordMockState recordState = new RecordMockState(new ProxyInstance(mocks), mocks);
     Assert.Throws<InvalidOperationException>(
         "This action is invalid when the mock object is in record state.",
         () => recordState.Verify());
 }