Пример #1
0
        public void PassingMockToMock_WhenErrorOccurs()
        {
            Accepter accepter = MockRepository.Mock <Accepter>();

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

            accepter.SetUnexpectedBehavior(UnexpectedCallBehaviors.BaseOrDefault);

            accepter.Accept(accepter);
            Assert.Throws <ExpectationViolationException>(
                () => accepter.VerifyExpectations(true));
        }
Пример #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));
        }
Пример #4
0
 public abstract void Accept(Accepter demo);
		public abstract void Accept(Accepter demo);