Beispiel #1
0
        public async Task SetHistorySizeConfigurationSuccessTest()
        {
            var context = _workContext.WithTag(_tag);

            const int newSize = 9999;
            await _admin.SetHistorySizeConfiguration(context, newSize);

            int?size = await _admin.GetHistorySizeConfiguration(context);

            size.Should().NotBeNull();
            size.Value.Should().Be(newSize);
        }
Beispiel #2
0
        public async Task <IActionResult> GetHistorySizeConfiguration()
        {
            RequestContext requestContext = this.HttpContext.GetRequestContext();
            var            context        = requestContext.Context.WithTag(_tag);

            int?size = await _administration.GetHistorySizeConfiguration(context);

            if (size == null)
            {
                return(new StandardActionResult(context, HttpStatusCode.NotFound));
            }

            var response = new HistoryDetailContractV1
            {
                HistorySize = (int)size,
            };

            return(new StandardActionResult(context)
                   .SetContent(response));
        }