Add test
This commit is contained in:
parent
50755b7215
commit
c0e4bf3d1d
@ -28,6 +28,7 @@ import org.junit.jupiter.api.Test;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that Caching example runs without errors.
|
* Tests that Caching example runs without errors.
|
||||||
@ -43,7 +44,14 @@ class AppTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void shouldExecuteApplicationWithoutException() {
|
void shouldExecuteApplicationWithoutException() {
|
||||||
|
|
||||||
assertDoesNotThrow(() -> App.main(new String[]{}));
|
assertDoesNotThrow(() -> App.main(new String[]{}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void executeAppWithException(){
|
||||||
|
assertThrows(
|
||||||
|
NoClassDefFoundError.class,
|
||||||
|
() -> App.main(new String[]{"--mongo"})
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user