Skip to content

Commit dcfcc6a

Browse files
test: improve coverage for org.moreunit.core.log
Added comprehensive JUnit 4 tests for Level and DefaultLogger, ensuring branch coverage for log severity checks, exception trace handling, and enum value resolution, resolving uncovered code in the core utility library. Fixed a compile error by downgrading annotations from Jupiter (which caused classloader conflicts in this OSGi test bundle setup) back to traditional JUnit 4 to match the environment restrictions. Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
1 parent 8ecd3d6 commit dcfcc6a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

org.moreunit.core.test/test/org/moreunit/core/log/DefaultLoggerTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
import org.eclipse.core.runtime.ILog;
1010
import org.eclipse.core.runtime.IStatus;
11-
import org.junit.jupiter.api.AfterEach;
12-
import org.junit.jupiter.api.BeforeEach;
13-
import org.junit.jupiter.api.Test;
11+
import org.junit.After;
12+
import org.junit.Before;
13+
import org.junit.Test;
1414
import org.mockito.ArgumentCaptor;
1515

1616
public class DefaultLoggerTest
@@ -20,13 +20,13 @@ public class DefaultLoggerTest
2020

2121
private ILog mockLog;
2222

23-
@BeforeEach
23+
@Before
2424
public void setUp()
2525
{
2626
mockLog = mock(ILog.class);
2727
}
2828

29-
@AfterEach
29+
@After
3030
public void tearDown()
3131
{
3232
System.clearProperty(LOG_LEVEL_PROPERTY);

org.moreunit.core.test/test/org/moreunit/core/log/LevelTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import static org.assertj.core.api.Assertions.assertThat;
44

5-
import org.junit.jupiter.api.Test;
5+
import org.junit.Test;
66

77
public class LevelTest
88
{

0 commit comments

Comments
 (0)