public void StubInterface_CanReadWriteProperties() { ITestNormal test = MockRepository.Mock<ITestNormal>(); test.Foo = 10; Assert.Equal(10, test.Foo); test.VerifyExpectations(); }
public void StubInterface_CanReadWriteProperties() { ITestNormal test = MockRepository.Mock <ITestNormal>(); test.SetUnexpectedBehavior(UnexpectedCallBehaviors.BaseOrDefault); test.Foo = 10; Assert.Equal(10, test.Foo); test.VerifyExpectations(); }
public void MockNormalInterface_CanSetProperties() { ITestNormal test = MockRepository.Mock<ITestNormal>(); test.ExpectProperty(x => x.Foo); test.Foo = 10; Assert.Equal(10, test.Foo); test.VerifyExpectations(); }
public void StubInterface_CanReadWriteProperties() { MockRepository mocks = new MockRepository(); ITestNormal test = mocks.Stub <ITestNormal>(); mocks.ReplayAll(); test.Foo = 10; Assert.Equal(10, test.Foo); mocks.VerifyAll(); }
public void MockNormalInterface_CanSetProperties() { MockRepository mocks = new MockRepository(); ITestNormal test = mocks.StrictMock <ITestNormal>(); SetupResult.For(test.Foo).PropertyBehavior(); mocks.ReplayAll(); test.Foo = 10; Assert.Equal(10, test.Foo); mocks.VerifyAll(); }