public void can_make_dynamic_mocks() { var moqFactory = new MoqFactory(); object fooMock = moqFactory.CreateMock(typeof (ITestMocks)); fooMock.ShouldNotBeNull(); }
public void can_make_partial_mocks() { var moqFactory = new MoqFactory(); var testPartials = (TestPartials) moqFactory.CreateMockThatCallsBase(typeof (TestPartials), new object[0]); testPartials.ShouldNotBeNull(); testPartials.Concrete().ShouldEqual("Concrete"); testPartials.Virtual().ShouldEqual("Virtual"); IMock<TestPartials> mock = Mock.Get(testPartials); mock.Expect(t => t.Virtual()).Returns("MOQed!"); testPartials.Virtual().ShouldEqual("MOQed!"); }