Revision: 3308
Author: [email protected]
Date: Thu Feb 18 07:57:18 2010
Log: Added persistence tests for the ProfileSettings of the ProfileManager.
http://code.google.com/p/power-architect/source/detail?r=3308

Added:
 /trunk/regress/ca/sqlpower/architect/profile/ProfileSettingsTest.java
Modified:
 /trunk/src/ca/sqlpower/architect/profile/ProfileSettings.java

=======================================
--- /dev/null
+++ /trunk/regress/ca/sqlpower/architect/profile/ProfileSettingsTest.java Thu Feb 18 07:57:18 2010
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2010, SQL Power Group Inc.
+ *
+ * This file is part of Power*Architect.
+ *
+ * Power*Architect is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Power*Architect is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package ca.sqlpower.architect.profile;
+
+import ca.sqlpower.architect.util.ArchitectNewValueMaker;
+import ca.sqlpower.object.PersistedSPObjectTest;
+import ca.sqlpower.object.SPObject;
+import ca.sqlpower.sql.DataSourceCollection;
+import ca.sqlpower.sql.SPDataSource;
+import ca.sqlpower.testutil.NewValueMaker;
+
+public class ProfileSettingsTest extends PersistedSPObjectTest {
+
+    private ProfileSettings profileSettings;
+
+    public ProfileSettingsTest(String name) {
+        super(name);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        profileSettings = (ProfileSettings) new ArchitectNewValueMaker(
+ getRootObject(), getPLIni()).makeNewValue(ProfileSettings.class, null, "");
+    }
+
+    @Override
+    protected Class<? extends SPObject> getChildClassType() {
+        return null;
+    }
+
+    @Override
+    public SPObject getSPObjectUnderTest() {
+        return profileSettings;
+    }
+
+    @Override
+    public NewValueMaker createNewValueMaker(SPObject root,
+            DataSourceCollection<SPDataSource> dsCollection) {
+        return new ArchitectNewValueMaker(root, dsCollection);
+    }
+
+}
=======================================
--- /trunk/src/ca/sqlpower/architect/profile/ProfileSettings.java Tue Feb 16 14:02:41 2010 +++ /trunk/src/ca/sqlpower/architect/profile/ProfileSettings.java Thu Feb 18 07:57:18 2010
@@ -148,7 +148,7 @@
     public void setFindingMinLength(boolean findingMinLength) {
         boolean oldMin = this.findingMinLength;
         this.findingMinLength = findingMinLength;
-        firePropertyChange("findingMinLenth", oldMin, findingMinLength);
+        firePropertyChange("findingMinLength", oldMin, findingMinLength);
     }

     @Accessor

Reply via email to