2016-04-15 23:47:32 +03:00
|
|
|
package com.baeldung;
|
|
|
|
|
|
2016-05-02 13:00:21 +03:00
|
|
|
import org.junit.gen5.api.Disabled;
|
2016-04-15 23:47:32 +03:00
|
|
|
import org.junit.gen5.api.Test;
|
|
|
|
|
|
|
|
|
|
import static org.junit.gen5.api.Assertions.assertAll;
|
|
|
|
|
import static org.junit.gen5.api.Assertions.assertEquals;
|
|
|
|
|
import static org.junit.gen5.api.Assertions.assertTrue;
|
|
|
|
|
|
|
|
|
|
class FirstTest {
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void lambdaExpressions() {
|
|
|
|
|
String string = "";
|
2016-05-02 13:00:21 +03:00
|
|
|
assertTrue(string::isEmpty, "String should be empty");
|
2016-04-15 23:47:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void groupAssertions() {
|
|
|
|
|
int[] numbers = {0,1,2,3,4};
|
|
|
|
|
assertAll("numbers", () -> {
|
|
|
|
|
assertEquals(numbers[0], 1);
|
|
|
|
|
assertEquals(numbers[3], 3);
|
|
|
|
|
assertEquals(numbers[4], 1);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2016-05-02 13:00:21 +03:00
|
|
|
@Test
|
|
|
|
|
@Disabled
|
|
|
|
|
void disabledTest() {
|
|
|
|
|
assertTrue(false);
|
|
|
|
|
}
|
2016-04-15 23:47:32 +03:00
|
|
|
}
|