public void TestSaveAndLoadConfiguration() { { // when Configuration configuration = WorkspaceFolder.LoadConfiguration(); // then Assert.AreEqual(ButlerFactory.EmotionalJenkins, configuration.Butler); Assert.AreEqual(BusinessesFolder.CheckJobStatus, configuration.Business); Assert.AreEqual(50, configuration.DesktopMargin); Assert.IsFalse(WorkspaceFolder.HasConfigurationFile); } { // when WorkspaceFolder.Save(new Configuration() { DesktopMargin = 40 }); // then Assert.IsTrue(WorkspaceFolder.HasConfigurationFile); Configuration configuration = WorkspaceFolder.LoadConfiguration(); Assert.AreEqual(ButlerFactory.EmotionalJenkins, configuration.Butler); Assert.AreEqual(BusinessesFolder.CheckJobStatus, configuration.Business); Assert.AreEqual(40, configuration.DesktopMargin); } }
public void TestHasConfigurationFile() { { // expect Assert.IsFalse(WorkspaceFolder.HasConfigurationFile); } { // setup WorkspaceFolder.Save(new Configuration()); // expect Assert.IsTrue(WorkspaceFolder.HasConfigurationFile); } }