~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/StringFormatterTest.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-05-13 21:43:22 UTC
  • mfrom: (1.2.1) (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130513214322-6frgd9du1n0w2uo7
Tags: 1.2.1-1
* Team upload.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
package org.eclipse.linuxtools.systemtap.ui.structures;
13
13
 
14
 
import org.eclipse.linuxtools.systemtap.ui.structures.IFormattingStyles;
15
 
import org.eclipse.linuxtools.systemtap.ui.structures.StringFormatter;
16
 
 
17
 
import junit.framework.TestCase;
18
 
 
19
 
public class StringFormatterTest extends TestCase {
20
 
 
21
 
//      public static void main(String[] args) {}
22
 
 
23
 
        public StringFormatterTest(String name) {
24
 
                super(name);
25
 
        }
26
 
 
27
 
        protected void setUp() throws Exception {
28
 
                super.setUp();
29
 
                
 
14
import static org.junit.Assert.assertEquals;
 
15
import static org.junit.Assert.assertNotNull;
 
16
import static org.junit.Assert.assertTrue;
 
17
 
 
18
import org.junit.Before;
 
19
import org.junit.Test;
 
20
 
 
21
public class StringFormatterTest {
 
22
 
 
23
        @Before
 
24
        public void setUp(){
30
25
                formatter = new StringFormatter();
31
26
        }
32
 
        
 
27
 
 
28
        @Test
33
29
        public void testStringFormatter() {
34
30
                formatter = new StringFormatter();
35
31
                assertNotNull(formatter);
36
32
        }
37
33
        
 
34
        @Test
38
35
        public void testGetFormat() {
39
36
                formatter.setFormat(IFormattingStyles.UNFORMATED);
40
37
                assertEquals(IFormattingStyles.UNFORMATED, formatter.getFormat());
86
83
                assertTrue("8.0".equals(formatter.format("8")));
87
84
        }
88
85
 
89
 
        protected void tearDown() throws Exception {
90
 
                super.tearDown();
91
 
        }
92
 
 
93
86
        StringFormatter formatter;
94
87
}