Пример #1
0
        public void DeleteTheme()
        {
            IThemeGateway themeGateway = Gateway.ThemeGateway;

            themeGateway.DeleteAllThemes();

            Theme theme = new Theme(0, "Animals");
            int   id    = themeGateway.AddTheme(theme);

            themeGateway.DeleteTheme(id);
            List <Theme> themeList = themeGateway.GetThemesList();

            Assert.AreEqual(0, themeList.Count);
        }
Пример #2
0
        public void AddTheme()
        {
            IThemeGateway themeGateway = Gateway.ThemeGateway;

            themeGateway.DeleteAllThemes();

            Theme        theme     = new Theme(0, "Animals");
            int          id        = themeGateway.AddTheme(theme);
            List <Theme> themeList = themeGateway.GetThemesList();

            Assert.AreEqual(1, themeList.Count);
            Theme theme1 = themeList[0];

            Assert.AreEqual(id, theme1.ID);
            Assert.AreEqual(theme.Name, theme1.Name);
        }