Ejemplo n.º 1
0
        private static IPreferences CreatePreferences(string applicationDataFolderPath)
        {
            string applicationPath = Path.GetFullPath(@"..\..\..\..\HFM");
            var    preferences     = new InMemoryPreferencesProvider(applicationPath, applicationDataFolderPath, null);

            preferences.Set(Preference.DecimalPlaces, 0);
            preferences.Set(Preference.WebOverview, "WebOverview.xslt");
            preferences.Set(Preference.WebSummary, "WebSummary.xslt");
            preferences.Set(Preference.WebSlot, "WebSlot.xslt");
            return(preferences);
        }
Ejemplo n.º 2
0
        public void MessagesModel_Load_FormLocationAndSize()
        {
            // Arrange
            var preferences = new InMemoryPreferencesProvider();

            preferences.Set(Preference.MessagesFormLocation, new Point(10, 20));
            preferences.Set(Preference.MessagesFormSize, new Size(30, 40));
            var model = new MessagesModel(preferences, null);

            // Act
            model.Load();
            // Assert
            Assert.AreEqual(new Point(10, 20), model.FormLocation);
            Assert.AreEqual(new Size(30, 40), model.FormSize);
        }
Ejemplo n.º 3
0
        public void PreferencesModel_Load_FromPreferences()
        {
            // Arrange
            var preferences = new InMemoryPreferencesProvider();

            preferences.Set(Preference.UseProxy, true);
            var model = new PreferencesModel(preferences, new InMemoryAutoRunConfiguration());

            // Act
            model.Load();
            // Assert
            Assert.IsTrue(model.WebProxyModel.Enabled);
        }