public void returns_the_entry_from_the_engine() { var entry = MockFor <ISparkViewEntry>(); _engine.Stub(x => x.CreateEntry(_descriptor)).Return(entry); ClassUnderTest.GetViewEntry(_descriptor).ShouldEqual(entry); }
public void if_entry_not_exists_creates_the_entry_using_the_engine() { var entry = MockFor <ISparkViewEntry>(); _engine.Stub(x => x.CreateEntry(_descriptor)).Return(entry); ClassUnderTest.GetViewEntry().ShouldEqual(entry); _cache[_descriptor.GetHashCode()].ShouldEqual(entry); }
protected override void beforeEach() { _fubuSparkView = MockFor <FubuSparkView>(); _engine = MockFor <ISparkViewEngine>(); _resourcePathManager = MockFor <IResourcePathManager>(); _engine.Stub(x => x.ResourcePathManager).Return(_resourcePathManager); }
protected override void beforeEach() { _fubuSparkView = MockFor <FubuSparkView>(); _engine = MockFor <ISparkViewEngine>(); _appPath = new SiteResourceAttacher.AppPath(); MockFor <IFubuRequest>().Stub(x => x.Get <SiteResourceAttacher.AppPath>()).Return(_appPath); _resourcePathManager = MockFor <IResourcePathManager>(); _engine.Stub(x => x.ResourcePathManager).Return(_resourcePathManager); }
protected override void beforeEach() { _sparkView = MockFor <FubuSparkView>(); _fubuSparkView = MockFor <FubuSparkView>(); _engine = MockFor <ISparkViewEngine>(); _request = MockFor <CurrentRequest>(); MockFor <IFubuRequest>().Stub(x => x.Get <CurrentRequest>()).Return(_request); _resourcePathManager = MockFor <IResourcePathManager>(); _engine.Stub(x => x.ResourcePathManager).Return(_resourcePathManager); }
public static ISparkViewEngine StubCreateInstance(this ISparkViewEngine sparkViewEngine, ISparkView view) { sparkViewEngine.Stub(x => x.CreateInstance(null)).IgnoreArguments().Return(view); return(sparkViewEngine); }