1 package org.itracker.model;
2 import static org.junit.Assert.assertNotNull;
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 LanguageTest {
11 private Language lan;
12
13 @Test
14 public void testSetLocale(){
15 try{
16 lan.setLocale(null);
17 fail("did not throw IllegalArgumentException");
18 } catch (IllegalArgumentException e){
19 assertTrue(true);
20 }
21 }
22
23 @Test
24 public void testSetResourceKey(){
25 try{
26 lan.setResourceKey(null);
27 fail("did not throw IllegalArgumentException");
28 } catch (IllegalArgumentException e){
29 assertTrue(true);
30 }
31 }
32
33 @Test
34 public void testToString(){
35 assertNotNull("toString", lan.toString());
36 }
37
38
39 @Before
40 public void setUp() throws Exception {
41 lan = new Language();
42 }
43
44 @After
45 public void tearDown() throws Exception {
46 lan = null;
47 }
48
49 }