public void PassingMockToMock_WhenErrorOccurs()
        {
            Accepter accepter = MockRepository.Mock <Accepter>();

            accepter.Accept(accepter);
            Assert.Throws <ExpectationViolationException>(
                () => accepter.VerifyExpectations(true));
        }
Example #2
0
        public void PassingMockToMock_WhenErrorOccurs()
        {
            Accepter accepter = MockRepository.Mock <Accepter>();

            accepter.SetUnexpectedBehavior(UnexpectedCallBehaviors.BaseOrDefault);

            accepter.Accept(accepter);
            Assert.Throws <ExpectationViolationException>(
                () => accepter.VerifyExpectations(true));
        }
Example #3
0
        public void PassingMockToMock_WhenErrorOccurs()
        {
            MockRepository mocks    = new MockRepository();
            Accepter       accepter = mocks.StrictMock <Accepter>();

            mocks.ReplayAll();
            Assert.Throws <ExpectationViolationException>(
                "Accepter.Accept(Rhino.Mocks.Tests.FieldsProblem.Accepter); Expected #0, Actual #1.",
                () => accepter.Accept(accepter));
        }