1 package com.atlassian.johnson.event;
2
3 import com.atlassian.johnson.Johnson;
4 import org.junit.AfterClass;
5 import org.junit.BeforeClass;
6 import org.junit.Test;
7
8 import static org.junit.Assert.assertEquals;
9
10 public class EventLevelTest
11 {
12 @BeforeClass
13 public static void initialize()
14 {
15 Johnson.initialize("test-johnson-config.xml");
16 }
17
18 @AfterClass
19 public static void terminate()
20 {
21 Johnson.terminate();
22 }
23
24 @Test
25 public void testEventLevel()
26 {
27 EventLevel level = new EventLevel("foo", "bar");
28 assertEquals("foo", level.getLevel());
29 assertEquals("bar", level.getDescription());
30 }
31
32 @Test
33 public void testGetEventLevel()
34 {
35 EventLevel expectedWarning = new EventLevel("warning", "This is a warning buddy");
36 assertEquals(expectedWarning, EventLevel.get("warning"));
37 }
38 }