mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Clean grapes before tests
This commit is contained in:
parent
d9fc3fc9de
commit
2d2ce0d3c3
@ -30,6 +30,7 @@ import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.springframework.cli.command.CleanCommand;
|
||||
import org.springframework.cli.command.RunCommand;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@ -42,9 +43,15 @@ import static org.junit.Assert.assertTrue;
|
||||
*/
|
||||
public class SampleIntegrationTests {
|
||||
|
||||
@BeforeClass
|
||||
public static void cleanGrapes() throws Exception {
|
||||
new CleanCommand().run("--all");
|
||||
}
|
||||
|
||||
private RunCommand command;
|
||||
|
||||
private PrintStream savedOutput;
|
||||
|
||||
private ByteArrayOutputStream output;
|
||||
|
||||
@Before
|
||||
|
@ -19,9 +19,8 @@ package org.springframework.cli.command;
|
||||
import groovy.lang.GroovyObjectSupport;
|
||||
import groovy.lang.Script;
|
||||
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.springframework.cli.command.OptionHandler;
|
||||
import org.springframework.cli.command.ScriptCommand;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
@ -36,6 +35,11 @@ public class ScriptCommandTests {
|
||||
|
||||
public static boolean executed = false;
|
||||
|
||||
@BeforeClass
|
||||
public static void cleanGrapes() throws Exception {
|
||||
new CleanCommand().run("--all");
|
||||
}
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void testMissing() throws Exception {
|
||||
ScriptCommand command = new ScriptCommand("missing");
|
||||
|
Loading…
Reference in New Issue
Block a user