Example #1
0
        public void Should_Get_All_Info()
        {
            var result = _appService.GetList();

            result.Count.ShouldBe(5); // 框架自带 2 个 setting + 种子数据 3 个

            result.Where(x => x.Name != "SettingWithProperty")
            .ToList()
            .ForEach(x =>
            {
                x.MainGroup.ShouldBe("Default");
                x.SubGroup.ShouldBe("General");
            });

            result.Where(x => x.Name == "SettingWithProperty")
            .ToList()
            .ForEach(x =>
            {
                x.MainGroup.ShouldBe("main");
                x.SubGroup.ShouldBe("sub");
            });
        }
Example #2
0
 public List <SettingDefinitionDto> GetList()
 {
     return(_settingAppService.GetList());
 }