Test won't run correctly trying to run a JUnit test errors
package picocli;
import picocli.CommandLine.Option;
public class ComparatorRunnerConfig {
@Option(names = {"-rc", "--report-class"}, required = false,
description = "define report")
private String report;
public String getReport() {
return report;
}
}
My JUnit test:
package picocli;
import static org.junit.Assert.*;
import org.junit.Test;
public class ConfigurationTest {
@Test
public void testBasicConfigOptions() {
String args = "-rc BlahBlah";
ComparatorRunnerConfig mfc = new ComparatorRunnerConfig();
new CommandLine(mfc).parse(args);
String myTestValue = mfc.getReport();
assertEquals(myTestValue, "BlahBlah");
}
}
Test fails.