Beispiel #1
0
 /// <summary>
 /// make (a) 'system under test'
 /// </summary>
 /// <param name="store">the store</param>
 /// <param name="helper">the (response) helper</param>
 /// <param name="faults">the fault (response provider)</param>
 /// <param name="safe">the safe (operations provider)</param>
 /// <returns>the system under test</returns>
 internal LocalAuthorityManagementFunctionAdapter MakeSUT(
     IValidateLocalAuthorities validator,
     IStoreLocalAuthorities store,
     IHttpResponseMessageHelper helper,
     IProvideFaultResponses faults,
     IProvideSafeOperations safe) =>
 new LocalAuthorityManagementFunctionAdapter(helper, faults, safe, store, validator);
        /// <summary>
        /// create an instance of <see cref="AreaRoutingDetailManagementFunctionAdapter"/>
        /// </summary>
        /// <param name="routingDetails">the storage provider</param>
        /// <param name="responseHelper">the response helper</param>
        /// <param name="faultResponses">the fault responses (provider)</param>
        /// <param name="safeOperations">the safe operations (provider)</param>
        /// <param name="analyser">the expression analyser</param>
        /// <param name="actions">the expression action provider</param>
        public AreaRoutingDetailManagementFunctionAdapter(
            IHttpResponseMessageHelper responseHelper,
            IProvideFaultResponses faultResponses,
            IProvideSafeOperations safeOperations,
            IStoreAreaRoutingDetails routingDetails,
            IValidateRoutingDetails validator,
            IAnalyseExpresssions analyser,
            IProvideExpressionActions actions)
        {
            It.IsNull(responseHelper)
            .AsGuard <ArgumentNullException>(nameof(responseHelper));
            It.IsNull(faultResponses)
            .AsGuard <ArgumentNullException>(nameof(faultResponses));
            It.IsNull(safeOperations)
            .AsGuard <ArgumentNullException>(nameof(safeOperations));
            It.IsNull(routingDetails)
            .AsGuard <ArgumentNullException>(nameof(routingDetails));
            It.IsNull(validator)
            .AsGuard <ArgumentNullException>(nameof(validator));
            It.IsNull(analyser)
            .AsGuard <ArgumentNullException>(nameof(analyser));
            It.IsNull(actions)
            .AsGuard <ArgumentNullException>(nameof(actions));

            Respond        = responseHelper;
            Faults         = faultResponses;
            SafeOperations = safeOperations;
            RoutingDetails = routingDetails;
            RoutingDetail  = validator;
            Analyser       = analyser;
            Actions        = actions;
        }
Beispiel #3
0
 /// <summary>
 /// make (a) 'system under test'
 /// </summary>
 /// <param name="store">the store</param>
 /// <param name="helper">the (response) helper</param>
 /// <param name="faults">the fault (response provider)</param>
 /// <param name="safe">the safe (operations provider)</param>
 /// <returns>the system under test</returns>
 internal AreaRoutingDetailManagementFunctionAdapter MakeSUT(
     IStoreAreaRoutingDetails store,
     IValidateRoutingDetails validator,
     IHttpResponseMessageHelper helper,
     IProvideFaultResponses faults,
     IProvideSafeOperations safe,
     IAnalyseExpresssions analyser,
     IProvideExpressionActions actions) =>
 new AreaRoutingDetailManagementFunctionAdapter(helper, faults, safe, store, validator, analyser, actions);
Beispiel #4
0
        /// <summary>
        /// instantiates a new instance of <see cref="LocalAuthorityManagementFunctionAdapter"/>
        /// </summary>
        /// <param name="responseHelper"></param>
        /// <param name="faultResponses"></param>
        /// <param name="safeOperations"></param>
        /// <param name="authorities"></param>
        public LocalAuthorityManagementFunctionAdapter(
            IHttpResponseMessageHelper responseHelper,
            IProvideFaultResponses faultResponses,
            IProvideSafeOperations safeOperations,
            IStoreLocalAuthorities authorities,
            IValidateLocalAuthorities validator)
        {
            It.IsNull(responseHelper)
            .AsGuard <ArgumentNullException>(nameof(responseHelper));
            It.IsNull(faultResponses)
            .AsGuard <ArgumentNullException>(nameof(faultResponses));
            It.IsNull(safeOperations)
            .AsGuard <ArgumentNullException>(nameof(safeOperations));
            It.IsNull(authorities)
            .AsGuard <ArgumentNullException>(nameof(authorities));
            It.IsNull(validator)
            .AsGuard <ArgumentNullException>(nameof(validator));

            Respond        = responseHelper;
            Faults         = faultResponses;
            SafeOperations = safeOperations;
            Authorities    = authorities;
            Authority      = validator;
        }