Exemple #1
0
		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();
        }
Exemple #3
0
		public void MockNormalInterface_CanSetProperties()
		{
			ITestNormal test = MockRepository.Mock<ITestNormal>();

            test.ExpectProperty(x => x.Foo);

			test.Foo = 10;
			Assert.Equal(10, test.Foo);

            test.VerifyExpectations();
		}