public void IAssetTagBuilder_is_registered_in_development_mode()
        {
            FubuMode.SetUpForDevelopmentMode();

            BehaviorGraph.BuildEmptyGraph().Services.DefaultServiceFor <IAssetTagBuilder>().Type.ShouldEqual(
                typeof(DevelopmentModeAssetTagBuilder));
        }
Exemplo n.º 2
0
        public FubuApplication BuildApplication(string directory)
        {
            FubuMode.SetUpForDevelopmentMode();

            throw new Exception("NWO");
            //return FubuRuntime.Basic();
        }
Exemplo n.º 3
0
        public void SetUp()
        {
            FubuMode.SetUpForDevelopmentMode();
            runtime = FubuApplication.DefaultPolicies().StructureMap().Bootstrap();

            runtime.Factory.Get <FubuDiagnosticsEndpoint>().get__fubu();
        }
Exemplo n.º 4
0
 public void should_be_applied_to_all()
 {
     FubuMode.SetUpForDevelopmentMode();
     using (var runtime = FubuApplication.For <AuthorizedRegistry>().StructureMap().Bootstrap())
     {
         runtime.Behaviors.BehaviorFor <FubuDiagnosticsEndpoint>(x => x.get__fubu()).Authorization.AllowedRoles().ShouldContain("admin");
         runtime.Behaviors.BehaviorFor <EndpointExplorerFubuDiagnostics>(x => x.get_endpoints()).Authorization.AllowedRoles().ShouldContain("admin");
     }
 }
Exemplo n.º 5
0
        public Tag_building_in_development_mode()
        {
            FubuMode.SetUpForDevelopmentMode();

            File("content/scripts/script1.js");

            File("content/styles/styles1.css");

            File("content/images/image1.bmp");
        }
 public void setup()
 {
     FubuMode.SetUpForDevelopmentMode();
     theGraph = BehaviorGraph.BuildFrom(x =>
     {
         x.Actions.IncludeType <SomeEndpoints>();
         x.Actions.IncludeType <OtherEndpoints>();
         x.Actions.IncludeType <EndpointExplorerFubuDiagnostics>();
     });
 }
Exemplo n.º 7
0
        public void create_with_html_head_injection()
        {
            FubuMode.SetUpForDevelopmentMode();

            PackageRegistry.Properties[HtmlHeadInjectionMiddleware.TEXT_PROPERTY] =
                new HtmlTag("script").Attr("foo", "bar").ToString();

            var settings = new OwinSettings();

            settings.Middleware.OfType <MiddlewareNode <HtmlHeadInjectionMiddleware> >()
            .Any().ShouldBeTrue();
        }
        public void not_applied_when_no_tracing_tag_is_on_the_chain()
        {
            FubuMode.SetUpForDevelopmentMode();

            using (var runtime = FubuApplication.DefaultPolicies().StructureMap().Bootstrap())
            {
                var graph = runtime.Factory.Get <BehaviorGraph>();

                graph.BehaviorFor <NotTracedEndpoint>(x => x.get_nothing()).OfType <DiagnosticNode>().Any().ShouldBeFalse();
                graph.BehaviorFor <NotTracedEndpoint>(x => x.get_nothing()).OfType <BehaviorTracerNode>().Any().ShouldBeFalse();

                graph.BehaviorFor <NotTracedEndpoint>(x => x.get_something()).OfType <DiagnosticNode>().Any().ShouldBeFalse();
                graph.BehaviorFor <NotTracedEndpoint>(x => x.get_something()).OfType <BehaviorTracerNode>().Any().ShouldBeFalse();

                graph.BehaviorFor <SomeTracingEndpoint>(x => x.get_tracing_no()).OfType <DiagnosticNode>().Any().ShouldBeFalse();
                graph.BehaviorFor <SomeTracingEndpoint>(x => x.get_tracing_no()).OfType <BehaviorTracerNode>().Any().ShouldBeFalse();

                graph.BehaviorFor <SomeTracingEndpoint>(x => x.get_tracing_yes()).OfType <DiagnosticNode>().Any().ShouldBeTrue();
                graph.BehaviorFor <SomeTracingEndpoint>(x => x.get_tracing_yes()).OfType <BehaviorTracerNode>().Any().ShouldBeTrue();
            }
        }
Exemplo n.º 9
0
 public void happy_path_dev_mode()
 {
     FubuMode.SetUpForDevelopmentMode();
     new ScriptTag(x => x, theAsset).ToString()
     .ShouldEqual("<script type=\"text/javascript\" src=\"foo.js?Etag={0}\"></script>".ToFormat(theFile.Etag()));
 }
Exemplo n.º 10
0
        public void level_is_verbose_in_development()
        {
            FubuMode.SetUpForDevelopmentMode();

            new DiagnosticsSettings().TraceLevel.ShouldEqual(TraceLevel.Verbose);
        }
Exemplo n.º 11
0
 protected virtual void startAll()
 {
     FubuMode.SetUpForDevelopmentMode();
     Task.WaitAll(_subSystems.Select(x => x.Start()).ToArray());
 }
Exemplo n.º 12
0
        public void no_headers_in_development_mode()
        {
            FubuMode.SetUpForDevelopmentMode();

            new AssetSettings().Headers.GetAllKeys().Any().ShouldBeFalse();
        }
Exemplo n.º 13
0
 public void SetUp()
 {
     FubuMode.SetUpForDevelopmentMode();
     graph = BehaviorGraph.BuildEmptyGraph();
 }
Exemplo n.º 14
0
 public FubuApplication BuildApplication()
 {
     FubuMode.SetUpForDevelopmentMode();
     return FubuApplication.DefaultPolicies().StructureMap();
 }
Exemplo n.º 15
0
        public void set_to_development_mode()
        {
            FubuMode.SetUpForDevelopmentMode();

            FubuMode.InDevelopment().ShouldBeTrue();
        }
Exemplo n.º 16
0
 public asset_writing_in_development()
 {
     FubuMode.SetUpForDevelopmentMode();
     File("Foo.js").WriteLine("var x = 0;");
 }