Exemple #1
0
 public void Init()
 {
     mocks   = new MockRepository();
     config  = mocks.StrictMock <IUserConfiguration>();
     factory = mocks.Stub <IViewFactory>();
     view    = mocks.DynamicMock <IWelcomeView>();
     ClientServiceLocator.Register(config);
 }
Exemple #2
0
        public void FirstMock()
        {
            var mocks = new MockRepository();
            var first = mocks.DynamicMock <First> ();

            mocks.ReplayAll();
            first.Expect(f => f.Method()).Return("hello");
            Assert.That(first.Method(), Is.EqualTo("hello"));
            mocks.VerifyAll();
        }
Exemple #3
0
 public void Init()
 {
     mocks = new MockRepository();
     factory = mocks.Stub<IViewFactory>();
     view = mocks.DynamicMock<IAboutView>();
 }
 public void Setup()
 {
     _factory = _mocks.DynamicMock <IUnitOfWorkFactory>();
     _session = _mocks.DynamicMock <ISession>();
 }