Skip to content

Commit

Permalink
remove test that doesn't test what it claims (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo committed Aug 14, 2023
1 parent 54e69eb commit b4da86e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 101 deletions.
Expand Up @@ -37,6 +37,7 @@
import org.apache.maven.plugin.LegacySupport;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.testing.AbstractMojoTestCase;
import org.apache.maven.plugin.testing.stubs.MavenProjectStub;
import org.apache.maven.plugins.javadoc.ProxyServer.AuthAsyncProxyServlet;
Expand Down Expand Up @@ -594,27 +595,6 @@ public void testOptionsUmlautEncoding() throws Exception {
}
}

/**
* @throws Exception if any
*/
public void testExceptions() throws Exception {
try {
Path testPom = unit.resolve("default-configuration/exception-test-plugin-config.xml");
JavadocReport mojo = lookupMojo(testPom);
mojo.execute();

fail("Must throw exception.");
} catch (Exception e) {
assertTrue(true);

try {
deleteDirectory(new File(getBasedir(), "exception"));
} catch (IOException ie) {
// nop
}
}
}

/**
* Method to test the taglet artifact configuration
*
Expand Down Expand Up @@ -821,8 +801,6 @@ public void testHeaderFooter() throws Exception {
} catch (MojoExecutionException e) {
fail("Doesnt handle correctly newline for header or footer parameter");
}

assertTrue(true);
}

/**
Expand All @@ -838,8 +816,6 @@ public void testNewline() throws Exception {
} catch (MojoExecutionException e) {
fail("Doesn't handle correctly newline for string parameters. See options and packages files.");
}

assertTrue(true);
}

/**
Expand Down Expand Up @@ -1167,8 +1143,7 @@ public void testStylesheetfile() throws Exception {
try {
mojo.execute();
fail();
} catch (Exception e) {
assertTrue(true);
} catch (MojoExecutionException | MojoFailureException e) {
}

// stylesheet == java
Expand Down

This file was deleted.

0 comments on commit b4da86e

Please sign in to comment.