|
33 | 33 | */ |
34 | 34 | package net.sourceforge.pmd.eclipse.runtime.properties; |
35 | 35 |
|
36 | | -import java.util.Iterator; |
| 36 | +import java.io.ByteArrayOutputStream; |
| 37 | +import java.io.PrintStream; |
37 | 38 | import java.util.Set; |
38 | 39 |
|
| 40 | +import org.eclipse.core.resources.IFile; |
| 41 | +import org.eclipse.core.resources.IProject; |
| 42 | +import org.eclipse.core.runtime.CoreException; |
| 43 | +import org.eclipse.ui.IWorkingSet; |
| 44 | +import org.junit.After; |
| 45 | +import org.junit.Assert; |
| 46 | +import org.junit.Before; |
| 47 | +import org.junit.Test; |
| 48 | + |
39 | 49 | import net.sourceforge.pmd.Rule; |
40 | 50 | import net.sourceforge.pmd.RuleSet; |
41 | 51 | import net.sourceforge.pmd.RuleSetFactory; |
|
46 | 56 | import net.sourceforge.pmd.eclipse.runtime.preferences.IPreferencesManager; |
47 | 57 | import net.sourceforge.pmd.lang.java.rule.AbstractJavaRule; |
48 | 58 |
|
49 | | -import org.eclipse.core.resources.IFile; |
50 | | -import org.eclipse.core.resources.IProject; |
51 | | -import org.eclipse.core.runtime.CoreException; |
52 | | -import org.eclipse.ui.IWorkingSet; |
53 | | -import org.junit.After; |
54 | | -import org.junit.Assert; |
55 | | -import org.junit.Before; |
56 | | -import org.junit.Test; |
57 | | - |
58 | 59 | /** |
59 | 60 | * Test the project properties model. |
60 | 61 | * |
@@ -186,10 +187,12 @@ public void testProjectRuleSet() throws PropertiesException { |
186 | 187 | final IProjectProperties model = mgr.loadProjectProperties(this.testProject); |
187 | 188 |
|
188 | 189 | final IPreferencesManager pmgr = PMDPlugin.getDefault().getPreferencesManager(); |
| 190 | + ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); |
| 191 | + PrintStream out = new PrintStream(byteStream); |
189 | 192 |
|
190 | 193 | Assert.assertTrue("A new project is not created with the default plugin ruleset", |
191 | 194 | EclipseUtils.assertRuleSetEquals(model.getProjectRuleSet().getRules(), pmgr.getRuleSet().getRules(), |
192 | | - System.out)); |
| 195 | + out)); |
193 | 196 | } |
194 | 197 |
|
195 | 198 | /** |
|
0 commit comments