Ejemplo n.º 1
0
		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 MockGenericInterface_CanSetProperties()
        {
            ITestGen <int> test = MockRepository.Mock <ITestGen <int> >();

            test.SetUnexpectedBehavior(UnexpectedCallBehaviors.BaseOrDefault);

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

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

            test.VerifyExpectations();
        }