Skip to content

Commit c835470

Browse files
committed
Remove usages of name.herlin.*
1 parent 283550d commit c835470

27 files changed

+210
-430
lines changed

net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/DetectCutAndPasteCmdTest.java

Lines changed: 51 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919
import net.sourceforge.pmd.eclipse.EclipseUtils;
2020
import net.sourceforge.pmd.eclipse.runtime.PMDRuntimeConstants;
2121

22-
import name.herlin.command.CommandException;
23-
import name.herlin.command.UnsetInputPropertiesException;
24-
2522
/**
2623
* Test the CPD command
2724
*
@@ -70,7 +67,7 @@ public void tearDown() throws Exception {
7067
*
7168
*/
7269
@Test
73-
public void testDetectCutAndPasteCmdBasic1() throws CommandException, CoreException {
70+
public void testDetectCutAndPasteCmdBasic1() throws CoreException {
7471
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
7572
cmd.setProject(this.testProject);
7673
cmd.setRenderer(new SimpleRenderer());
@@ -101,7 +98,7 @@ public void testDetectCutAndPasteCmdBasic1() throws CommandException, CoreExcept
10198
*
10299
*/
103100
@Test
104-
public void testDetectCutAndPasteCmdBasic2() throws CommandException, CoreException {
101+
public void testDetectCutAndPasteCmdBasic2() throws CoreException {
105102
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
106103
cmd.setProject(this.testProject);
107104
cmd.setCreateReport(false);
@@ -119,135 +116,85 @@ public void testDetectCutAndPasteCmdBasic2() throws CommandException, CoreExcept
119116

120117
/**
121118
* Test robustness #1
122-
*
123-
* @throws CommandException
124119
*/
125-
@Test
126-
public void testDetectCutAndPasteCmdNullArg1() throws CommandException {
127-
128-
try {
129-
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
130-
cmd.setProject(null);
131-
cmd.setRenderer(new SimpleRenderer());
132-
cmd.setReportName(PMDRuntimeConstants.SIMPLE_CPDREPORT_NAME);
133-
cmd.performExecute();
134-
Assert.fail();
135-
} catch (final UnsetInputPropertiesException e) {
136-
// yes cool
137-
}
120+
@Test(expected = IllegalStateException.class)
121+
public void testDetectCutAndPasteCmdNullArg1() {
122+
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
123+
cmd.setProject(null);
124+
cmd.setRenderer(new SimpleRenderer());
125+
cmd.setReportName(PMDRuntimeConstants.SIMPLE_CPDREPORT_NAME);
126+
cmd.performExecute();
138127
}
139128

140129
/**
141130
* Test robustness #2
142-
*
143-
* @throws CommandException
144131
*/
145-
@Test
146-
public void testDetectCutAndPasteCmdNullArg2() throws CommandException {
147-
try {
148-
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
149-
cmd.setProject(this.testProject);
150-
cmd.setRenderer(null);
151-
cmd.setReportName(PMDRuntimeConstants.SIMPLE_CPDREPORT_NAME);
152-
cmd.performExecute();
153-
Assert.fail();
154-
} catch (final UnsetInputPropertiesException e) {
155-
// yes cool
156-
}
132+
@Test(expected = IllegalStateException.class)
133+
public void testDetectCutAndPasteCmdNullArg2() {
134+
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
135+
cmd.setProject(this.testProject);
136+
cmd.setRenderer(null);
137+
cmd.setReportName(PMDRuntimeConstants.SIMPLE_CPDREPORT_NAME);
138+
cmd.performExecute();
157139
}
158140

159141
/**
160142
* Test robustness #3
161-
*
162-
* @throws CommandException
163143
*/
164-
@Test
165-
public void testDetectCutAndPasteCmdNullArg3() throws CommandException {
166-
try {
167-
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
168-
cmd.setProject(this.testProject);
169-
cmd.setRenderer(new SimpleRenderer());
170-
cmd.setReportName(null);
171-
cmd.performExecute();
172-
Assert.fail();
173-
} catch (final UnsetInputPropertiesException e) {
174-
// yes cool
175-
}
144+
@Test(expected = IllegalStateException.class)
145+
public void testDetectCutAndPasteCmdNullArg3() {
146+
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
147+
cmd.setProject(this.testProject);
148+
cmd.setRenderer(new SimpleRenderer());
149+
cmd.setReportName(null);
150+
cmd.performExecute();
176151
}
177152

178153
/**
179154
* Test robustness #4
180-
*
181-
* @throws CommandException
182155
*/
183-
@Test
184-
public void testDetectCutAndPasteCmdNullArg4() throws CommandException {
185-
try {
186-
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
187-
cmd.setProject(null);
188-
cmd.setRenderer(null);
189-
cmd.setReportName(PMDRuntimeConstants.SIMPLE_CPDREPORT_NAME);
190-
cmd.performExecute();
191-
Assert.fail();
192-
} catch (final UnsetInputPropertiesException e) {
193-
// yes cool
194-
}
156+
@Test(expected = IllegalStateException.class)
157+
public void testDetectCutAndPasteCmdNullArg4() {
158+
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
159+
cmd.setProject(null);
160+
cmd.setRenderer(null);
161+
cmd.setReportName(PMDRuntimeConstants.SIMPLE_CPDREPORT_NAME);
162+
cmd.performExecute();
195163
}
196164

197165
/**
198166
* Test robustness #5
199-
*
200-
* @throws CommandException
201167
*/
202-
@Test
203-
public void testDetectCutAndPasteCmdNullArg5() throws CommandException {
204-
try {
205-
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
206-
cmd.setProject(null);
207-
cmd.setRenderer(new SimpleRenderer());
208-
cmd.setReportName(null);
209-
cmd.performExecute();
210-
Assert.fail();
211-
} catch (final UnsetInputPropertiesException e) {
212-
// yes cool
213-
}
168+
@Test(expected = IllegalStateException.class)
169+
public void testDetectCutAndPasteCmdNullArg5() {
170+
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
171+
cmd.setProject(null);
172+
cmd.setRenderer(new SimpleRenderer());
173+
cmd.setReportName(null);
174+
cmd.performExecute();
214175
}
215176

216177
/**
217178
* Test robustness #6
218-
*
219-
* @throws CommandException
220179
*/
221-
@Test
222-
public void testDetectCutAndPasteCmdNullArg6() throws CommandException {
223-
try {
224-
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
225-
cmd.setProject(this.testProject);
226-
cmd.setRenderer(null);
227-
cmd.setReportName(null);
228-
cmd.performExecute();
229-
Assert.fail();
230-
} catch (final UnsetInputPropertiesException e) {
231-
// yes cool
232-
}
180+
@Test(expected = IllegalStateException.class)
181+
public void testDetectCutAndPasteCmdNullArg6() {
182+
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
183+
cmd.setProject(this.testProject);
184+
cmd.setRenderer(null);
185+
cmd.setReportName(null);
186+
cmd.performExecute();
233187
}
234188

235189
/**
236190
* Test robustness #7
237-
*
238-
* @throws CommandException
239191
*/
240-
@Test
241-
public void testDetectCutAndPasteCmdNullArg7() throws CommandException {
242-
try {
243-
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
244-
cmd.setProject(null);
245-
cmd.setRenderer(null);
246-
cmd.setReportName(null);
247-
cmd.performExecute();
248-
Assert.fail();
249-
} catch (final UnsetInputPropertiesException e) {
250-
// yes cool
251-
}
192+
@Test(expected = IllegalStateException.class)
193+
public void testDetectCutAndPasteCmdNullArg7() {
194+
final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
195+
cmd.setProject(null);
196+
cmd.setRenderer(null);
197+
cmd.setReportName(null);
198+
cmd.performExecute();
252199
}
253200
}

net.sourceforge.pmd.eclipse.plugin.test/src/main/java/net/sourceforge/pmd/eclipse/runtime/cmd/MultipleRulesetsTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
import net.sourceforge.pmd.eclipse.runtime.properties.IProjectProperties;
2828
import net.sourceforge.pmd.eclipse.runtime.properties.IProjectPropertiesManager;
2929

30-
import name.herlin.command.CommandException;
31-
3230
/**
3331
* This tests execution of PMD with multiple rulesets
3432
*/
@@ -106,7 +104,7 @@ public void tearDown() throws Exception {
106104
* Test the basic usage of the processor command
107105
*/
108106
@Test
109-
public void testReviewCmdBasic() throws CommandException, CoreException {
107+
public void testReviewCmdBasic() throws CoreException {
110108
final ReviewCodeCmd cmd = new ReviewCodeCmd();
111109
cmd.addResource(this.testProject);
112110
cmd.performExecute();

0 commit comments

Comments
 (0)