1 package org.itracker.model;
2 import static org.junit.Assert.assertEquals;
3 import static org.junit.Assert.assertTrue;
4 import static org.junit.Assert.fail;
5
6 import org.junit.After;
7 import org.junit.Before;
8 import org.junit.Test;
9
10 public class StatusTest {
11
12 @Test
13 public void testValueOf(){
14 try{
15 Status.valueOf(0);
16 fail("did not throw IllegalArgumentException");
17 } catch (IllegalArgumentException e){
18 assertTrue(true);
19 }
20
21 assertEquals("code -1",Status.DELETED, Status.valueOf(-1));
22 assertEquals("code 1",Status.ACTIVE,Status.valueOf(1));
23 assertEquals("code 2",Status.VIEWABLE,Status.valueOf(2));
24 assertEquals("code 3",Status.LOCKED,Status.valueOf(3));
25 }
26
27
28
29 @Before
30 public void setUp() throws Exception {
31 }
32
33 @After
34 public void tearDown() throws Exception {
35 }
36
37 }