| 1 |
|
package org.europa.together.utils; |
| 2 |
|
|
| 3 |
|
import java.lang.reflect.Constructor; |
| 4 |
|
import org.europa.together.JUnit5Preperator; |
| 5 |
|
import org.europa.together.application.LogbackLogger; |
| 6 |
|
import org.europa.together.business.Logger; |
| 7 |
|
import org.europa.together.domain.LogLevel; |
| 8 |
|
import static org.junit.jupiter.api.Assertions.*; |
| 9 |
|
import org.junit.jupiter.api.Test; |
| 10 |
|
import org.junit.jupiter.api.extension.ExtendWith; |
| 11 |
|
|
| 12 |
|
@SuppressWarnings("unchecked") |
| 13 |
|
@ExtendWith({JUnit5Preperator.class}) |
| |
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 2 |
Complexity Density: 0.29 |
|
| 14 |
|
public class ConstraintsTest { |
| 15 |
|
|
| 16 |
|
private static final Logger LOGGER = new LogbackLogger(ConstraintsTest.class); |
| 17 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
1PASS
|
|
| 18 |
1 |
@Test... |
| 19 |
|
void privateConstructor() throws Exception { |
| 20 |
1 |
Constructor<Constraints> clazz |
| 21 |
|
= Constraints.class.getDeclaredConstructor(); |
| 22 |
1 |
clazz.setAccessible(true); |
| 23 |
1 |
assertThrows(Exception.class, () -> { |
| 24 |
1 |
Constraints call = clazz.newInstance(); |
| 25 |
|
}); |
| 26 |
|
} |
| 27 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
1PASS
|
|
| 28 |
1 |
@Test... |
| 29 |
|
void generateToString() { |
| 30 |
1 |
String info = Constraints.printConstraintInfo(); |
| 31 |
1 |
LOGGER.log(info, LogLevel.DEBUG); |
| 32 |
1 |
assertNotNull(info); |
| 33 |
|
} |
| 34 |
|
} |