public void find_home_is_not_set() { var graph = new FubuRegistry(x => { x.Applies.ToThisAssembly(); x.Actions.IncludeClassesSuffixedWithController(); }).BuildGraph(); graph.FindHomeChain().ShouldBeNull(); }
public void find_home_is_not_null() { var graph = new FubuRegistry(x => { x.Applies.ToThisAssembly(); x.Actions.IncludeClassesSuffixedWithController(); x.Routes.HomeIs <MyHomeController>(c => c.ThisIsHome()); }).BuildGraph(); graph.FindHomeChain().FirstCall().Method.Name.ShouldEqual("ThisIsHome"); }
public void should_remove_chain() { var graph = new FubuRegistry(x => { x.Applies.ToThisAssembly(); x.Actions.IncludeClassesSuffixedWithController(); x.Routes.HomeIs <MyHomeController>(c => c.ThisIsHome()); }).BuildGraph(); var chain = graph.FindHomeChain(); graph.RemoveChain(chain); graph .Behaviors .ShouldNotContain(chain); }