Esempio n. 1
0
 public void SetUp()
 {
     _page = MockRepository.GenerateMock <IFubuPage>();
     _urls = MockRepository.GenerateStub <IUrlRegistry>();
     _page.Expect(p => p.Urls).Return(_urls);
     _model = new InputModel();
     _urls.Stub(u => u.UrlFor(Arg <InputModel> .Is.NotNull)).Return("some url");
 }
Esempio n. 2
0
        public void by_model()
        {
            var model = new TestOutputModel();

            urls.Stub(x => x.UrlFor(model)).Return("url1");
            authorizor.Stub(x => x.IsAuthorized(model)).Return(true);

            ClassUnderTest.EndpointFor(model).ShouldEqual(new Endpoint {
                IsAuthorized = true,
                Url          = "url1"
            });
        }
 public void SetUp()
 {
     _page = MockRepository.GenerateMock<IFubuPage>();
     _urls = MockRepository.GenerateStub<IUrlRegistry>();
     _page.Expect(p => p.Urls).Return(_urls);
     _model = new InputModel();
     _urls.Stub(u => u.UrlFor(Arg<InputModel>.Is.NotNull)).Return("some url");
 }