From d98b93d369ac6625cfc8e567c4610f0497eddeef Mon Sep 17 00:00:00 2001 From: Philippe Herlin Date: Sat, 2 Jul 2005 14:31:11 +0000 Subject: [PATCH] Fixing equals assertion to test on rules collection instead git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@3645 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/eclipse/model/ProjectPropertiesModelTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pmd-eclipse-test/test/test/net/sourceforge/pmd/eclipse/model/ProjectPropertiesModelTest.java b/pmd-eclipse-test/test/test/net/sourceforge/pmd/eclipse/model/ProjectPropertiesModelTest.java index 9eaedac03a..7757b9540a 100644 --- a/pmd-eclipse-test/test/test/net/sourceforge/pmd/eclipse/model/ProjectPropertiesModelTest.java +++ b/pmd-eclipse-test/test/test/net/sourceforge/pmd/eclipse/model/ProjectPropertiesModelTest.java @@ -64,6 +64,9 @@ import test.net.sourceforge.pmd.eclipse.EclipseUtils; * @version $Revision$ * * $Log$ + * Revision 1.3 2005/07/02 14:31:11 phherlin + * Fixing equals assertion to test on rules collection instead + * * Revision 1.2 2005/07/01 00:06:38 phherlin * Refactoring and writing more tests * @@ -147,7 +150,7 @@ public class ProjectPropertiesModelTest extends TestCase { // Test the ruleset we set is equal to the ruleset we queried RuleSet projectRuleSet = model.getProjectRuleSet(); assertNotNull("Project ruleset has not been set", projectRuleSet); - assertEquals("The project ruleset is not the basic ruleset", basicRuleSet, projectRuleSet); + assertEquals("The project ruleset is not the basic ruleset", basicRuleSet.getRules(), projectRuleSet.getRules()); } /** @@ -179,7 +182,7 @@ public class ProjectPropertiesModelTest extends TestCase { // First ensure that the plugin initial ruleset is equal to the project ruleset ProjectPropertiesModel model = new ProjectPropertiesModelImpl(this.testProject); RuleSet projectRuleSet = model.getProjectRuleSet(); - assertEquals("The project ruleset is not equal to the plugin ruleset", initialPluginRuleSet, projectRuleSet); + assertEquals("The project ruleset is not equal to the plugin ruleset", this.initialPluginRuleSet, projectRuleSet); // 2. add a rule to the plugin rule set Rule myRule = new AbstractRule() { @@ -196,7 +199,7 @@ public class ProjectPropertiesModelTest extends TestCase { // Test that the project rule set should still be the same as the plugin rule set model = new ProjectPropertiesModelImpl(this.testProject); - projectRuleSet = model.getProjectRuleSet(); + projectRuleSet = model.getProjectRuleSet(); assertEquals("The project ruleset is not equal to the plugin ruleset", PMDPlugin.getDefault().getRuleSet().getRules(), projectRuleSet.getRules()); }