Exemplo n.º 1
0
        public void CurrentThemeUpdateTest()
        {
            var themeviewmodel = new ThemeViewModel(controller.Object);
            themeviewmodel.CurrentTheme = themes[0];

            controller.Verify(c => c.SetTheme(themes[0].Name));
        }
Exemplo n.º 2
0
        public void CurrentAccentUpdateTest()
        {
            var themeviewmodel = new ThemeViewModel(controller.Object);
            themeviewmodel.CurrentAccent = accents[0];

            controller.Verify(c => c.SetAccent(accents[0].Name));
        }
Exemplo n.º 3
0
        public void CurrentAccentNoUpdateTest()
        {
            var themeviewmodel = new ThemeViewModel(controller.Object);

            controller.Verify(c => c.SetAccent(accents[2].Name), Times.Once);
            themeviewmodel.CurrentAccent = accents[2];
            controller.Verify(c => c.SetAccent(accents[2].Name), Times.Once);
        }
Exemplo n.º 4
0
        public void CurrentThemeNoUpdateTest()
        {
            var themeviewmodel = new ThemeViewModel(controller.Object);

            //set gets called once on construction, but not after set
            controller.Verify(c => c.SetTheme(themes[1].Name), Times.Once);
            themeviewmodel.CurrentTheme = themes[1];
            controller.Verify(c => c.SetTheme(themes[1].Name), Times.Once);
        }
Exemplo n.º 5
0
        public void ConstructionTest()
        {
            var themeviewmodel = new ThemeViewModel(controller.Object);

            Assert.AreEqual(themeviewmodel.Themes, themes);
            Assert.AreEqual(themeviewmodel.Accents, accents);
            Assert.AreEqual(themeviewmodel.CurrentTheme, themes[1]);
            Assert.AreEqual(themeviewmodel.CurrentAccent, accents[2]);
        }
Exemplo n.º 6
0
 public SettingsViewModel(ThemeViewModel themeViewModel)
 {
     this.themeViewModel = themeViewModel;
 }