View Javadoc

1   package com.google.code.jetm.reporting.ext;
2   
3   import static org.fest.assertions.Assertions.assertThat;
4   
5   import org.junit.Before;
6   import org.junit.Test;
7   
8   /**
9    * Unit tests for {@link NoOpEtmPoint}.
10   * 
11   * @author JH016266
12   * 
13   */
14  
15  public class NoOpEtmPointTest {
16      private final String name = "a.point.name";
17      private NoOpEtmPoint point;
18  
19      /**
20       * Set up the point for each test.
21       */
22      @Before
23      public void setUp() {
24          point = new NoOpEtmPoint(name);
25      }
26  
27      /**
28       * Test the altering of the name.
29       */
30      @Test
31      public void testAlterName() {
32          final String newName = "AXJFKDLS:FSD" + name;
33          point.alterName(newName);
34          assertThat(point.getName()).isEqualTo(newName);
35      }
36  
37      /**
38       * Test the retrieval of the name.
39       */
40      @Test
41      public void testGetName() {
42          assertThat(point.getName()).isEqualTo(name);
43      }
44  
45  }