Skip to content
Snippets Groups Projects
Commit 929e0769 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

refactoring

parent 4d3fe3a5
No related branches found
No related tags found
No related merge requests found
......@@ -205,4 +205,11 @@ public class ExecutionTest {
new Execution<NameConfig>(configuration); // do not execute, but just initialize the execution
}
@Test
public void mainMethod() {
assertFalse(MainMethodTestConfig.executed);
Execution.main(new String[] { "teetime.framework.RunnerConfig" });
assertTrue(MainMethodTestConfig.executed);
}
}
......@@ -2,11 +2,11 @@ package teetime.framework;
import teetime.stage.InitialElementProducer;
public class RunnerConfig extends Configuration {
public class MainMethodTestConfig extends Configuration {
public static boolean executed = false;
public RunnerConfig() {
public MainMethodTestConfig() {
connectPorts(new InitialElementProducer<Object>(new Object()).getOutputPort(), new StaticSetter().getInputPort());
}
......
package teetime.framework;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
public class RunnerTest {
@Test
public void test() {
assertFalse(RunnerConfig.executed);
Execution.main(new String[] { "teetime.framework.RunnerConfig" });
assertTrue(RunnerConfig.executed);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment