public void SetUp() { graph = new FubuRegistry().BuildGraph(); urls = MockRepository.GenerateMock<IUrlRegistry>(); writer = new BehaviorGraphWriter(graph, urls, null, new StubCurrentHttpRequest("http://server")); }
public KatanaHostingActivator(KatanaSettings settings, FubuRouteTable routes, IUrlRegistry urls, IServiceLocator services) { _settings = settings; _routes = routes.Routes; _urls = urls; _services = services; }
public BootstrapAuthorizationFailureHandler(IOutputWriter writer, IRequestData requestData, IUrlRegistry urlRegistry, IHttpRequest currentHttpRequest) { _writer = writer; _requestData = requestData; _urlRegistry = urlRegistry; _currentHttpRequest = currentHttpRequest; }
public AjaxAuthenticationRedirect(IRequestData data, IJsonWriter jsonWriter, IOutputWriter outputWriter, IUrlRegistry urls) { _data = data; _jsonWriter = jsonWriter; _outputWriter = outputWriter; _urls = urls; }
public ResourceAction(ConnegActionFinder connegActionActionFinder, ActionCallMapper actionCallMapper, IUrlRegistry urlRegistry, ICurrentHttpRequest currentHttpRequest) { _connegActionActionFinder = connegActionActionFinder; _actionCallMapper = actionCallMapper; _urlRegistry = urlRegistry; _currentHttpRequest = currentHttpRequest; }
public ExampleHtmlWriter(IServiceLocator serviceLocator, IUrlRegistry urlRegistry, BehaviorGraph behaviorGraph) { _serviceLocator = serviceLocator; _urlRegistry = urlRegistry; _behaviorGraph = behaviorGraph; _examplePageUrl = "_fubu/html/example".ToAbsoluteUrl(); }
public void SetUp() { graph = new FubuRegistry(x => { x.Applies.ToThisAssembly(); }).BuildGraph(); urls = MockRepository.GenerateMock<IUrlRegistry>(); writer = new BehaviorGraphWriter(graph, urls); }
public void SetUp() { urls = MockRepository.GenerateMock<IUrlRegistry>(); page = MockRepository.GenerateMock<IFubuPage>(); page.Stub(x => x.Urls).Return(urls); }
public CaseController(IRepository repository, FubuHtmlDocument <Case> document, ISqlRunner runner, IUrlRegistry urls) { _repository = repository; _document = document; _runner = runner; _urls = urls; }
public DiagnosticMenuTag(IDiagnosticContext context, ICurrentHttpRequest currentHttpRequest, IUrlRegistry urls) : base("ul") { AddClass("nav"); var group = context.CurrentGroup(); var index = group.Index(); if (index != null) { addLink(index, context, currentHttpRequest); } else { var url = urls.UrlFor(new GroupRequest {Name = group.Name}); var li = Add("li"); li.Add("a").Attr("href", url).Text(group.Name).Attr("title", group.Description); if (context.CurrentChain() == null) { li.AddClass("active"); } } group.Links().Each(x => addLink(x, context, currentHttpRequest)); }
public void SetUp() { graph = new FubuRegistry().BuildGraph(); urls = MockRepository.GenerateMock<IUrlRegistry>(); writer = new BehaviorGraphWriter(graph, urls, null); }
public NavigationService(BehaviorGraph graph, ICurrentHttpRequest request, IMenuStateService stateService, IUrlRegistry urls) { _request = request; _stateService = stateService; _urls = urls; _navigation = graph.Settings.Get <NavigationGraph>(); }
public PostHandler(IDocumentDatabase database, ISecurityContext securityContext, IUrlRegistry urlRegistry) { _database = database; _securityContext = securityContext; _urlRegistry = urlRegistry; }
public RequestLinksTag(RequestLog log, IUrlRegistry urls) { AddHeader("Chain Details"); Add("li").Add("a").Id("chain-summary").Attr("href", "#").Text("View Summary"); Add("li").Add("span/a").Attr("href", urls.UrlFor(new ChainDetailsRequest{Id = log.ChainId})).Text("View Details").AddClass("external").Attr("target", "_blank"); }
public SingleContentEndpoint(IRepository<Content> repository, SiteSettings settings, ServerVariables vars, IUrlRegistry reg) { _repository = repository; _settings = settings; _vars = vars; _reg = reg; }
public ProductNotFoundConvention(IOutputWriter outputWriter, IUrlRegistry urlRegistry, IFubuRequest fubuRequest) : base(PartialBehavior.Executes) { _outputWriter = outputWriter; _urlRegistry = urlRegistry; _fubuRequest = fubuRequest; }
public BehaviorGraphWriter(BehaviorGraph graph, IUrlRegistry urls, IServiceLocator services) { _graph = graph; _urls = urls; _services = services; _diagnosticsNamespace = GetType().Namespace; }
protected MessagesTableTag(IEnumerable <QueueMessage> messages, IUrlRegistry urls, Action <TableRowTag> additionalHeaders, Action <TableRowTag, PersistentMessage> additionalColumns) { _urls = urls; AddClass("table"); AddHeaderRow(row => { row.Header("Id"); row.Header("Status"); row.Header("Sent At"); row.Header("Headers"); if (additionalHeaders != null) { additionalHeaders(row); } }); messages.Each(message => AddBodyRow(row => { AddMessageRow(row, message); if (additionalColumns != null) { additionalColumns(row, message.InternalMessage); } })); }
public SamlEndpoint(IRequestData requestData, SamlResponseRedirector redirector, IUrlRegistry urls, ISamlResponseWriter writer) { _requestData = requestData; _redirector = redirector; _urls = urls; _writer = writer; }
public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IActionBehavior inner, IUrlRegistry urls) { _report = report; _detector = detector; _inner = inner; _urls = urls; }
public static HtmlDocument BuildDocument(IUrlRegistry urls, string title, params HtmlTag[] tags) { string css = GetDiagnosticCss(); var realTitle = "FubuMVC: " + title; var document = new HtmlDocument(); document.Title = realTitle; var mainDiv = new HtmlTag("div").AddClass("main"); mainDiv.Add("h2").Text("FubuMVC Diagnostics").Append(buildVersionTag()); var navBar = mainDiv.Add("div").AddClass("homelink"); if (urls != null) { navBar.Append(new LinkTag("Home", urls.UrlFor <BehaviorGraphWriter>(w => w.Index(), null))); } navBar.Add("span").Text(" > " + title); document.Add(mainDiv); mainDiv.Append(tags); document.AddStyle(css); return(document); }
public ProjectEndpoints(IUrlRegistry urls, ITopicTokenCache tokenCache, ISnippetCache cache, AppReloaded reloaded) { _urls = urls; _tokenCache = tokenCache; _cache = cache; _reloaded = reloaded; }
public AuthenticationRequiredBehavior(ISecurityContext securityContext, IUrlRegistry urlRegistry, IOutputWriter outputWriter) : base(PartialBehavior.Ignored) { _securityContext = securityContext; _urlRegistry = urlRegistry; _outputWriter = outputWriter; }
public FeedWriter(IFeedDefinition <T> definition, ILinkSource <T> links, IUrlRegistry urls, IOutputWriter writer) { _definition = definition; _links = links; _urls = urls; _writer = writer; }
public NavigationService(BehaviorGraph graph, ICurrentHttpRequest request, IMenuStateService stateService, IUrlRegistry urls) { _request = request; _stateService = stateService; _urls = urls; _navigation = graph.Settings.Get<NavigationGraph>(); }
public void SetUp() { urls = MockRepository.GenerateMock <IUrlRegistry>(); page = MockRepository.GenerateMock <IFubuPage>(); page.Stub(x => x.Urls).Return(urls); }
public virtual HtmlDocument BuildView(IUrlRegistry urls, IOutputWriter writer, LoginRequest request) { // TODO -- Revisit all of this when we get HTML conventions everywhere var view = new HtmlDocument(); var form = new FormTag(urls.UrlFor <LoginRequest>("POST")); form.Append(new HtmlTag("legend").Text(LoginKeys.Login)); if (request.Message.IsNotEmpty()) { form.Append(new HtmlTag("p").Text(request.Message).Style("color", "red")); } form.Append(new TextboxTag("UserName", request.UserName)); form.Append(new TextboxTag("Password", request.Password)); form.Append(new CheckboxTag(request.RememberMe).Name("RememberMe")); form.Append(new DivTag().Text(request.Message).Id("login-message")); form.Append(new HiddenTag().Name("Url").Attr("value", request.Url)); form.Append(new HtmlTag("input").Attr("type", "submit").Attr("value", LoginKeys.Login).Id("login-submit")); view.Add(form); return(view); }
public GridTagWriter(IColumnPolicies policies, ITemplateWriter templates, IAssetRequirements assets, IUrlRegistry urls, T grid) { _policies = policies; _templates = templates; _assets = assets; _urls = urls; _grid = grid; }
public AuthenticationRequiredBehaviour(ISecurityContext securityContext, ICurrentHttpRequest httpRequest, IUrlRegistry urlRegistry, IOutputWriter outputWriter) : base(PartialBehavior.Ignored) { this.securityContext = securityContext; this.httpRequest = httpRequest; this.urlRegistry = urlRegistry; this.outputWriter = outputWriter; }
public DiagnosticBehavior(IRequestTrace trace, IDebugDetector detector, IOutputWriter writer, IExceptionHandlingObserver exceptionObserver, IUrlRegistry urls) { _trace = trace; _detector = detector; _writer = writer; _exceptionObserver = exceptionObserver; _urls = urls; }
public EmbeddedFubuMvcServer(KatanaSettings settings, IUrlRegistry urls, IServiceLocator services, IList <RouteBase> routes) { _urls = urls; _services = services; startServer(routes, AppDomain.CurrentDomain.BaseDirectory, settings.Port); buildEndpointDriver(settings.Port); }
public RequestLogBuilder(IUrlRegistry urls, ISystemTime systemTime, ICurrentHttpRequest request, ICurrentChain currentChain, IRequestData requestData) { _urls = urls; _systemTime = systemTime; _request = request; _currentChain = currentChain; _requestData = requestData; }
public static RouteReport ForChain(BehaviorChain chain, IUrlRegistry urls) { return(new RouteReport(chain, urls.UrlFor(new ChainRequest { Id = chain.UniqueId }), urls.UrlFor(new ChainDetailsRequest { Id = chain.UniqueId }))); }
public ScheduledJobsFubuDiagnostics(IUrlRegistry urls, ISchedulePersistence persistence, ChannelGraph graph, ScheduledJobGraph jobs, IScheduledJobController controller) { _urls = urls; _persistence = persistence; _graph = graph; _jobs = jobs; _controller = controller; }
public ContinuationHandler(IUrlRegistry registry, IOutputWriter writer, IFubuRequest request, IPartialFactory factory, IChainResolver resolver) { _registry = registry; _writer = writer; _request = request; _factory = factory; _resolver = resolver; }
/// <summary> /// Inline way to resolve a url for an input model type by defining the RouteParameters object by /// expressions /// </summary> /// <typeparam name="T"></typeparam> /// <param name="registry"></param> /// <param name="configure"></param> /// <returns></returns> public static string UrlFor <T>(this IUrlRegistry registry, Action <RouteParameters <T> > configure) { var parameters = new RouteParameters <T>(); configure(parameters); return(registry.UrlFor <T>(parameters)); }
public Link CreateLink(IUrlRegistry urls) { var url = _source(urls); var link = new Link(url); _modifications.Each(x => x(link)); return link; }
public void SetUp() { _page = MockRepository.GenerateMock <IFubuPage>(); _urls = MockRepository.GenerateStub <IUrlRegistry>(); _page.Expect(p => p.Urls).Return(_urls); _model = new InputModel(); _urls.Stub(u => u.UrlFor(Arg <InputModel> .Is.NotNull)).Return("some url"); }
/// <summary> /// Inline way to resolve a url for an input model type by defining the RouteParameters object by /// expressions /// </summary> /// <typeparam name="T"></typeparam> /// <param name="registry"></param> /// <param name="configure"></param> /// <returns></returns> public static string UrlFor <T>(this IUrlRegistry registry, string category, Action <RouteParameters <T> > configure) { var parameters = new RouteParameters <T>(); configure(parameters); return(registry.UrlFor(typeof(T), parameters, category)); }
public FeedWriter(IFeedSource <T> feedSource, IFeedDefinition <T> definition, ILinkSource <T> links, IUrlRegistry urls) { _feedSource = feedSource; _definition = definition; _links = links; _urls = urls; }
public MediaWriter(IMediaDocument document, ILinkSource <T> links, IUrlRegistry urls, IValueProjection <T> projection) { _document = document; _links = links; _urls = urls; _projection = projection; }
public MustBeAuthenticatedBehaviour(ISecurityContext securityContext, IOutputWriter writer, IUrlRegistry urls, IFubuRequest request) : base(PartialBehavior.Ignored) { _securityContext = securityContext; _writer = writer; _urls = urls; _request = request; }
public void SetUp() { graph = new DiagnosticsRegistry().BuildGraph(); urls = MockRepository.GenerateMock<IUrlRegistry>(); graph.Behaviors.Any().ShouldBeTrue(); graph.Actions().Each(x => Debug.WriteLine(x.Description)); }
protected override void beforeEach() { _serviceLocator = MockFor <IServiceLocator>(); _urlRegistry = MockFor <IUrlRegistry>(); ClassUnderTest.ServiceLocator.ShouldBeNull(); ClassUnderTest.ServiceLocator = _serviceLocator; _serviceLocator.Stub(x => x.GetInstance(typeof(IUrlRegistry))).Return(_urlRegistry); }
public EntityCreator(INewEntityHandler <TEdit> newEntityHandler, IEntitySaver <TEntity> saver, IValidator validator, IUrlRegistry urls, IFlattener flattener) { _newEntityHandler = newEntityHandler; _saver = saver; _validator = validator; _urls = urls; _flattener = flattener; }
public ValidationContinuationHandler(IUrlRegistry registry, IOutputWriter writer, IFubuRequest request, IPartialFactory factory) { _registry = registry; _writer = writer; _request = request; _factory = factory; }
public void SetUp() { _page = MockRepository.GenerateMock<IFubuPage>(); _urls = new StubUrlRegistry(); _page.Expect(p => p.Urls).Return(_urls); _model = new InputModel(); //_urls.Stub(u => u.UrlFor(Arg<InputModel>.Is.NotNull)).Return("some url"); }
public DiagnosticBehavior(IDebugReport report, IDebugDetector detector, IUrlRegistry urls, IRequestHistoryCache history) { _report = report; _detector = detector; _urls = urls; history.AddReport(report); }
public ExampleHtmlWriter(IServiceLocator serviceLocator, IUrlRegistry urlRegistry, BehaviorGraph behaviorGraph, ICurrentHttpRequest httpRequest) { _serviceLocator = serviceLocator; _urlRegistry = urlRegistry; _behaviorGraph = behaviorGraph; _httpRequest = httpRequest; _examplePageUrl = httpRequest.ToFullUrl("_fubu/html/example"); }
public MustBeAuthorizedBehavior(ActionCall actionCall, ISecurityContext securityContext, IUrlRegistry urls, IFubuRequest request, IOutputWriter writer) : base(PartialBehavior.Ignored) { _actionCall = actionCall; _securityContext = securityContext; _urls = urls; _request = request; _writer = writer; }