private void TestFavoriteColors(IColorsLabController colorsLab) { var favPanel1 = colorsLab.GetFavColorPanel1(); var originalFavColor = favPanel1.BackColor; try { // empty fav colors colorsLab.GetEmptyFavColorsButton().PerformClick(); var colorAftReset = favPanel1.BackColor; AssertEqual(Color.White, colorAftReset); // set mono panel1's color as fav color var monoPanel1 = colorsLab.GetMonoPanel1(); ApplyColor(monoPanel1, favPanel1); AssertEqual(monoPanel1.BackColor, favPanel1.BackColor); } finally { // reset fav colors from last time saved colorsLab.GetResetFavColorsButton().PerformClick(); AssertEqual(originalFavColor, favPanel1.BackColor); } }