public void IAssetTagBuilder_is_registered_in_development_mode() { FubuMode.SetUpForDevelopmentMode(); BehaviorGraph.BuildEmptyGraph().Services.DefaultServiceFor <IAssetTagBuilder>().Type.ShouldEqual( typeof(DevelopmentModeAssetTagBuilder)); }
public FubuApplication BuildApplication(string directory) { FubuMode.SetUpForDevelopmentMode(); throw new Exception("NWO"); //return FubuRuntime.Basic(); }
public void SetUp() { FubuMode.SetUpForDevelopmentMode(); runtime = FubuApplication.DefaultPolicies().StructureMap().Bootstrap(); runtime.Factory.Get <FubuDiagnosticsEndpoint>().get__fubu(); }
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"); } }
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>(); }); }
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(); } }
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())); }
public void level_is_verbose_in_development() { FubuMode.SetUpForDevelopmentMode(); new DiagnosticsSettings().TraceLevel.ShouldEqual(TraceLevel.Verbose); }
protected virtual void startAll() { FubuMode.SetUpForDevelopmentMode(); Task.WaitAll(_subSystems.Select(x => x.Start()).ToArray()); }
public void no_headers_in_development_mode() { FubuMode.SetUpForDevelopmentMode(); new AssetSettings().Headers.GetAllKeys().Any().ShouldBeFalse(); }
public void SetUp() { FubuMode.SetUpForDevelopmentMode(); graph = BehaviorGraph.BuildEmptyGraph(); }
public FubuApplication BuildApplication() { FubuMode.SetUpForDevelopmentMode(); return FubuApplication.DefaultPolicies().StructureMap(); }
public void set_to_development_mode() { FubuMode.SetUpForDevelopmentMode(); FubuMode.InDevelopment().ShouldBeTrue(); }
public asset_writing_in_development() { FubuMode.SetUpForDevelopmentMode(); File("Foo.js").WriteLine("var x = 0;"); }