示例#1
0
        public void Allow_A_Theme_To_Be_Added_For_A_Parser()
        {
            // arrange
            var repo = new ThemeRepository()
            {
                Themes = new Dictionary <string, Theme>()
                {
                    ["a"] = Theme.Cool
                }
            };

            // act
            repo.SetTheme("a", Theme.Warm);

            // assert
            repo.Get("a").Should().BeSameAs(Theme.Warm);
        }
        //[Route("Get")]

        public IActionResult Get()
        {
            IEnumerable <Modeles.ThemeLite> theme = _themeRepo.Get().Select(T => T.DalToApiThemeLite());

            return(Ok(theme));
        }
示例#3
0
 public Theme Get(int?id)
 {
     return(_themeRepository.Get(id));
 }