/// <summary>
 /// Initializes a new instance of the <see cref="DefaultNancyModuleBuilder"/> class.
 /// </summary>
 /// <param name="viewFactory">The <see cref="IViewFactory"/> instance that should be assigned to the module.</param>
 /// <param name="responseFormatterFactory">An <see cref="IResponseFormatterFactory"/> instance that should be used to create a response formatter for the module.</param>
 /// <param name="modelBinderLocator">A <see cref="IModelBinderLocator"/> instance that should be assigned to the module.</param>
 /// <param name="validatorLocator">A <see cref="IModelValidatorLocator"/> instance that should be assigned to the module.</param>
 public DefaultNancyModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory, IModelBinderLocator modelBinderLocator, IModelValidatorLocator validatorLocator)
 {
     this.viewFactory = viewFactory;
     this.responseFormatterFactory = responseFormatterFactory;
     this.modelBinderLocator       = modelBinderLocator;
     this.validatorLocator         = validatorLocator;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultNancyModuleBuilder"/> class.
 /// </summary>
 /// <param name="viewFactory">The <see cref="IViewFactory"/> instance that should be assigned to the module.</param>
 /// <param name="responseFormatterFactory">An <see cref="IResponseFormatterFactory"/> instance that should be used to create a response formatter for the module.</param>
 /// <param name="modelBinderLocator">A <see cref="IModelBinderLocator"/> instance that should be assigned to the module.</param>
 /// <param name="validatorLocator">A <see cref="IModelValidatorLocator"/> instance that should be assigned to the module.</param>
 public DefaultNancyModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory, IModelBinderLocator modelBinderLocator, IModelValidatorLocator validatorLocator)
 {
     this.viewFactory = viewFactory;
     this.responseFormatterFactory = responseFormatterFactory;
     this.modelBinderLocator = modelBinderLocator;
     this.validatorLocator = validatorLocator;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultNancyModuleBuilder"/> class.
 /// </summary>
 /// <param name="viewFactory">The <see cref="IViewFactory"/> instance that should be assigned to the module.</param>
 /// <param name="responseFormatterFactory">An <see cref="IResponseFormatterFactory"/> instance that should be used to create a response formatter for the module.</param>
 /// <param name="modelBinderLocator">A <see cref="IModelBinderLocator"/> instance that should be assigned to the module.</param>
 /// <param name="validatorLocator">A <see cref="IModelValidatorLocator"/> instance that should be assigned to the module.</param>
 public DefaultModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory, IModelBinderLocator modelBinderLocator, IModelValidatorLocator validatorLocator)
 {
     _viewFactory = viewFactory;
     _responseFormatterFactory = responseFormatterFactory;
     _modelBinderLocator = modelBinderLocator;
     _validatorLocator = validatorLocator;
 }
 public ModuleExtensionsFixture()
 {
     this.validatorLocator = A.Fake <IModelValidatorLocator>();
     this.subject          = new FakeNancyModule
     {
         ValidatorLocator = validatorLocator
     };
 }
 public ModuleExtensionsFixture()
 {
     this.context          = new NancyContext();
     this.validatorLocator = A.Fake <IModelValidatorLocator>();
     this.subject          = new FakeNancyModule
     {
         Context          = this.context,
         ValidatorLocator = this.validatorLocator
     };
 }
 public ModuleExtensionsFixture()
 {
     this.context = new NancyContext();
     this.validatorLocator = A.Fake<IModelValidatorLocator>();
     this.subject = new FakeNancyModule
     {
         Context = this.context,
         ValidatorLocator = this.validatorLocator
     };
 }
 public RavenAwareModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory,
                                IModelBinderLocator modelBinderLocator,
                                IRavenSessionProvider ravenSessionProvider,
      IModelValidatorLocator validatorLocator)
 {
     this.viewFactory = viewFactory;
     this.responseFormatterFactory = responseFormatterFactory;
     this.modelBinderLocator = modelBinderLocator;
     this.validatorLocator = validatorLocator;
     _ravenSessionProvider = ravenSessionProvider;
 }
Example #8
0
 public RavenAwareModuleBuilder(IViewFactory viewFactory, IResponseFormatterFactory responseFormatterFactory,
                                IModelBinderLocator modelBinderLocator,
                                IRavenSessionProvider ravenSessionProvider,
                                IModelValidatorLocator validatorLocator)
 {
     this.viewFactory = viewFactory;
     this.responseFormatterFactory = responseFormatterFactory;
     this.modelBinderLocator       = modelBinderLocator;
     this.validatorLocator         = validatorLocator;
     _ravenSessionProvider         = ravenSessionProvider;
 }
        public DefaultNancyModuleBuilderFixture()
        {
            this.module = new FakeNancyModule();

            this.responseFormatterFactory =
                A.Fake <IResponseFormatterFactory>();

            this.viewFactory        = A.Fake <IViewFactory>();
            this.modelBinderLocator = A.Fake <IModelBinderLocator>();
            this.validatorLocator   = A.Fake <IModelValidatorLocator>();
            this.builder            = new DefaultNancyModuleBuilder(this.viewFactory, this.responseFormatterFactory, this.modelBinderLocator, this.validatorLocator);
        }
        public DefaultNancyModuleBuilderFixture()
        {
            this.module = new FakeNancyModule();

            this.responseFormatterFactory =
                A.Fake<IResponseFormatterFactory>();

            this.viewFactory = A.Fake<IViewFactory>();
            this.modelBinderLocator = A.Fake<IModelBinderLocator>();
            this.validatorLocator = A.Fake<IModelValidatorLocator>();

            this.builder = new DefaultNancyModuleBuilder(this.viewFactory, this.responseFormatterFactory, this.modelBinderLocator, this.validatorLocator);
        }