/// <summary>
        /// create an instance of hte <see cref="AreaRoutingDetailStore"/>
        /// </summary>
        /// <param name="paths">the storage paths (provider)</param>
        /// <param name="store">the document store</param>
        public AreaRoutingDetailStore(
            IProvideStoragePaths paths,
            IStoreDocuments store)
        {
            It.IsNull(paths)
            .AsGuard <ArgumentNullException>(nameof(paths));
            It.IsNull(store)
            .AsGuard <ArgumentNullException>(nameof(store));

            StoragePaths  = paths;
            DocumentStore = store;
        }
Ejemplo n.º 2
0
            public Validator(IStoreDocuments docStore)
            {
                this.docStore = docStore;

                RuleFor(x => x.Id)
                .MustAsync(Exist)
                .WithHttpStatusCode(HttpStatusCode.NotFound);

                RuleFor(x => x.Offset)
                .MustAsync(NotAlreadyExist)
                .WithHttpStatusCode(HttpStatusCode.Conflict);
            }
Ejemplo n.º 3
0
        /// <summary>
        /// create an instance of hte <see cref="LocalAuthorityStore"/>
        /// </summary>
        /// <param name="paths">the storage paths (provider)</param>
        /// <param name="store">the document store</param>
        public LocalAuthorityStore(
            IProvideStoragePaths paths,
            IStoreDocuments store)
        {
            It.IsNull(paths)
            .AsGuard <ArgumentNullException>(nameof(paths));
            It.IsNull(store)
            .AsGuard <ArgumentNullException>(nameof(store));

            StoragePaths  = paths;
            DocumentStore = store;
        }
Ejemplo n.º 4
0
            public Validator(IStoreDocuments documentStore)
            {
                this.documentStore = documentStore;

                RuleFor(x => x.Id)
                .NotEmpty()
                .WithHttpStatusCode(HttpStatusCode.BadRequest)
                .MustAsync(Exist)
                .WithHttpStatusCode(HttpStatusCode.NotFound);

                RuleFor(x => x.Category)
                .NotEmpty();
            }
 public OrderCollection(IStoreDocuments documentsStore)
     : base(documentsStore)
 {
 }
Ejemplo n.º 6
0
 public Handler(IStoreDocuments documentStore)
 {
     this.documentStore = documentStore;
 }
Ejemplo n.º 7
0
 public TestCollection(JsonSerializerSettings jsonSerializerSettings, IStoreDocuments documentsStore)
     : base(jsonSerializerSettings, documentsStore)
 {
 }
Ejemplo n.º 8
0
 public TestCollection(IStoreDocuments documentsStore)
     : base(documentsStore)
 {
 }
Ejemplo n.º 9
0
 /// <summary>
 /// make (a) 'system under test'
 /// </summary>
 /// <param name="paths">the storage paths provider</param>
 /// <param name="store">the document store</param>
 /// <returns>the system under test</returns>
 internal AreaRoutingDetailStore MakeSUT(
     IProvideStoragePaths paths,
     IStoreDocuments store) =>
 new AreaRoutingDetailStore(paths, store);
 /// <summary>
 /// make (a) 'system under test'
 /// </summary>
 /// <param name="paths">the storage paths provider</param>
 /// <param name="store">the document store</param>
 /// <returns>the system under test</returns>
 internal LocalAuthorityStore MakeSUT(
     IProvideStoragePaths paths,
     IStoreDocuments store) =>
 new LocalAuthorityStore(paths, store);