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");
 }
示例#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");
 }