Search in sources :

Example 6 with UnsetInputPropertiesException

use of name.herlin.command.UnsetInputPropertiesException in project pmd-eclipse-plugin by pmd.

the class DetectCutAndPasteCmdTest method testDetectCutAndPasteCmdNullArg5.

/**
 * Test robustness #5
 *
 * @throws CommandException
 */
@Test
public void testDetectCutAndPasteCmdNullArg5() throws CommandException {
    try {
        final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
        cmd.setProject(null);
        cmd.setRenderer(new SimpleRenderer());
        cmd.setReportName(null);
        cmd.performExecute();
        Assert.fail();
    } catch (final UnsetInputPropertiesException e) {
    // yes cool
    }
}
Also used : UnsetInputPropertiesException(name.herlin.command.UnsetInputPropertiesException) SimpleRenderer(net.sourceforge.pmd.cpd.SimpleRenderer) Test(org.junit.Test)

Example 7 with UnsetInputPropertiesException

use of name.herlin.command.UnsetInputPropertiesException in project pmd-eclipse-plugin by pmd.

the class DetectCutAndPasteCmdTest method testDetectCutAndPasteCmdNullArg3.

/**
 * Test robustness #3
 *
 * @throws CommandException
 */
@Test
public void testDetectCutAndPasteCmdNullArg3() throws CommandException {
    try {
        final DetectCutAndPasteCmd cmd = new DetectCutAndPasteCmd();
        cmd.setProject(this.testProject);
        cmd.setRenderer(new SimpleRenderer());
        cmd.setReportName(null);
        cmd.performExecute();
        Assert.fail();
    } catch (final UnsetInputPropertiesException e) {
    // yes cool
    }
}
Also used : UnsetInputPropertiesException(name.herlin.command.UnsetInputPropertiesException) SimpleRenderer(net.sourceforge.pmd.cpd.SimpleRenderer) Test(org.junit.Test)

Aggregations

UnsetInputPropertiesException (name.herlin.command.UnsetInputPropertiesException)7 Test (org.junit.Test)6 SimpleRenderer (net.sourceforge.pmd.cpd.SimpleRenderer)3 HTMLRenderer (net.sourceforge.pmd.renderers.HTMLRenderer)3 CommandException (name.herlin.command.CommandException)1 Timer (name.herlin.command.Timer)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 Job (org.eclipse.core.runtime.jobs.Job)1