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 Johnson.initialize("test-johnson-config.xml");
15 }
16
17 @AfterClass
18 public static void terminate() {
19 Johnson.terminate();
20 }
21
22 @Test
23 public void testEventLevel() {
24 EventLevel level = new EventLevel("foo", "bar");
25 assertEquals("foo", level.getLevel());
26 assertEquals("bar", level.getDescription());
27 }
28
29 @Test
30 public void testGetEventLevel() {
31 EventLevel expectedWarning = new EventLevel("warning", "This is a warning buddy");
32 assertEquals(expectedWarning, EventLevel.get("warning"));
33 }
34 }