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