Exemplo n.º 1
0
        public void CanClearOnlyOriginalMethodCalls()
        {
            MockRepository mocks         = new MockRepository();
            AbstractClass  abstractClass = mocks.StrictMock <AbstractClass>();

            Expect.Call(abstractClass.Add(0)).CallOriginalMethod(OriginalCallOptions.NoExpectation);
            mocks.BackToRecord(abstractClass, BackToRecordOptions.OriginalMethodsToCall);
            mocks.ReplayAll();

            Assert.Throws <ExpectationViolationException>(
                "AbstractClass.Add(5); Expected #0, Actual #1.",
                () => abstractClass.Add(5));
        }
Exemplo n.º 2
0
 public void SetUp()
 {
     mocks = new MockRepository();
     abs = (AbstractClass)mocks.PartialMock(typeof(AbstractClass));
 }
Exemplo n.º 3
0
		public PartialMockTests()
        {
            abs = MockRepository.Partial<AbstractClass>();
        }
Exemplo n.º 4
0
 public void SetUp()
 {
     abs = (AbstractClass) MockRepository.GeneratePartialMock(typeof (AbstractClass), new Type[] {});
 }
Exemplo n.º 5
0
 public PartialMockTestsAAA()
 {
     abs = (AbstractClass) MockRepository.GeneratePartialMock(typeof (AbstractClass), new Type[] {});
 }
 public PartialMockTestsAAA()
 {
     abs = MockRepository.Partial <AbstractClass>();
     abs.SetUnexpectedBehavior(UnexpectedCallBehaviors.BaseOrDefault);
 }
Exemplo n.º 7
0
 public PartialMockTestsAAA()
 {
     abs = (AbstractClass)MockRepository.GeneratePartialMock(typeof(AbstractClass), new Type[] {});
 }
Exemplo n.º 8
0
 public PartialMockTests()
 {
     mocks = new MockRepository();
     abs   = (AbstractClass)mocks.PartialMock(typeof(AbstractClass));
 }
Exemplo n.º 9
0
 public PartialMockTestsAAA()
 {
     abs = MockRepository.Partial <AbstractClass>();
 }
Exemplo n.º 10
0
 public PartialStubTests()
 {
     abs = (AbstractClass)MockRepository.GeneratePartialStub(typeof(AbstractClass), null);
 }
Exemplo n.º 11
0
 public PartialStubTests()
 {
     mocks = new MockRepository();
     abs = (AbstractClass)mocks.PartialStub(typeof(AbstractClass));
 }