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()); }
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()); }
public void VerifyOnRecordThrowsTwoMockTypes() { MockRepository mocks = new MockRepository(); RecordMockState recordState = new RecordMockState(new ProxyInstance(mocks, typeof(IAnimal), typeof(IDemo)), mocks); recordState.Verify(); }
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); }
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()); }
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()); }