1
2
3
4
5
6
7
8
9
10
11
12
13
14 package org.slf4j.test_osgi;
15
16 import org.junit.jupiter.api.AfterEach;
17 import org.junit.jupiter.api.BeforeEach;
18 import org.junit.jupiter.api.Test;
19
20 import java.io.File;
21
22 import static org.junit.jupiter.api.Assertions.*;
23
24 public class BundleTest {
25
26 FrameworkErrorListener fel = new FrameworkErrorListener();
27 CheckingBundleListener mbl = new CheckingBundleListener();
28
29 FelixHost felixHost = new FelixHost(fel, mbl);
30
31 @BeforeEach
32 public void setUp() throws Exception {
33 felixHost.doLaunch();
34 }
35
36 @AfterEach
37 protected void tearDown() throws Exception {
38 felixHost.stop();
39 }
40
41 @Test
42 public void testSmoke() {
43 System.out.println("===========" + new File(".").getAbsolutePath());
44 mbl.dumpAll();
45
46 assertTrue(mbl.exists("iBundle"));
47 if (fel.errorList.size() != 0) {
48 fel.dumpAll();
49 }
50
51 assertEquals(0, fel.errorList.size());
52 }
53 }