コード例 #1
0
        public void GetSettingValuesByModuleId_ReturnValuesFromCacheAndRepository(int moduleId, bool useCache)
        {
            var okResult = _controller.GetSettingValuesByModuleId(moduleId, useCache).Result as OkObjectResult;

            Assert.NotNull(okResult);
            var items = Assert.IsAssignableFrom <IList <DtoConfigurationSetting> >(okResult.Value);

            Assert.All(items, item => Assert.NotNull(item.Name));
            Output.WriteLine("Settings count : {0}", items.Count());

            var envVariable = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");

            Output.WriteLine($"env: '{envVariable}'");
        }