Commit 9a8f7877 authored by David Trott's avatar David Trott

Cleaned up unit test and stripped some white space.

parent 4c467f9e
......@@ -79,11 +79,11 @@ abstract class AbstractThriftMojo extends AbstractMojo {
* This string is passed to the {@code --gen} option of the {@code thrift} parameter. By default
* it will generate Java output. The main reason for this option is to be able to add options
* to the Java generator - if you generate something else, you're on your own.
*
*
* @parameter default-value="java"
*/
private String generator;
/**
* @parameter
*/
......
package org.apache.thrift.maven;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.cli.CommandLineException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
......@@ -43,6 +44,16 @@ public class TestThrift {
@Test
public void testThriftCompile() throws Exception {
executeThriftCompile();
}
@Test
public void testThriftCompileWithGeneratorOption() throws Exception {
builder.setGenerator("java:private-members,hashcode");
executeThriftCompile();
}
private void executeThriftCompile() throws CommandLineException {
final File thriftFile = new File(idlDir, "shared.thrift");
builder.addThriftFile(thriftFile);
......@@ -61,12 +72,6 @@ public class TestThrift {
new File(testRootDir, "shared/SharedService.java").exists());
}
@Test
public void testThriftCompileWithGeneratorOption() throws Exception {
builder.setGenerator("java:private-members,hashcode");
testThriftCompile();
}
@Test
public void testThriftMultipleFileCompile() throws Exception {
final File sharedThrift = new File(idlDir, "shared.thrift");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment