Exemplo n.º 1
0
        public void should_remove_chain_from_caches()
        {
            var graph = new FubuRegistry(x =>
            {
                x.Applies.ToThisAssembly();
                x.Actions.IncludeClassesSuffixedWithController();
            }).BuildGraph();

            var chain = graph.ChainsFor(typeof(MyRequestModel)).First();

            graph.RemoveChain(chain);

            graph
            .ChainsFor(typeof(MyRequestModel))
            .ShouldNotContain(chain);
        }
Exemplo n.º 2
0
        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);
        }