Пример #1
0
        public async Task <IDictionary <string, IDictionary <string, ServiceDefinition> > > GetServicesAsync(CancellationToken cancellationToken = default)
        {
            var getServicesCommand       = new GetServicesCommand();
            var getServicesCommandResult = await ConnectionService.SendCommandAsync <GetServicesCommand, GetServicesCommandResult>(getServicesCommand, cancellationToken);

            getServicesCommandResult.EnsureSuccessResult();

            return(getServicesCommandResult.Result);
        }
        public void GetServicesValidator_is_valid_if_gencontext_is_initialized(GetServicesValidator validator, GetServicesCommand command)
        {
            InitFakeGenContext();

            validator
            .ShouldNotHaveValidationErrorFor(x => GenContext.ToolBox, command);
        }
        public void GetServicesValidator_failed_if_gencontext_is_not_initialized(GetServicesValidator validator, GetServicesCommand command)
        {
            ClearFakeGenContext();

            validator
            .ShouldHaveValidationErrorFor(x => GenContext.ToolBox, command)
            .WithErrorMessage(StringRes.BadReqNotSynced);
        }