1. Project Clover database Wed Jan 17 2024 23:40:18 CST
  2. Package org.europa.together.utils

File ConstraintsTest.java

 

Code metrics

0
7
2
1
34
29
2
0.29
3.5
2
1

Classes

Class Line # Actions
ConstraintsTest 14 7 0% 2 0
1.0100%
 

Contributing tests

This file is covered by 2 tests. .

Source view

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})
 
14    public class ConstraintsTest {
15   
16    private static final Logger LOGGER = new LogbackLogger(ConstraintsTest.class);
17   
 
18  1 toggle @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   
 
28  1 toggle @Test
29    void generateToString() {
30  1 String info = Constraints.printConstraintInfo();
31  1 LOGGER.log(info, LogLevel.DEBUG);
32  1 assertNotNull(info);
33    }
34    }