1 package org.apache.maven.plugins.surefire.report;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import junit.framework.TestCase;
23
24
25
26
27
28 public class ReportTestCaseTest
29 extends TestCase
30 {
31 private ReportTestCase tCase;
32
33
34 protected void setUp()
35 throws Exception
36 {
37 super.setUp();
38
39 tCase = new ReportTestCase();
40 }
41
42
43 protected void tearDown()
44 throws Exception
45 {
46 super.tearDown();
47
48 tCase = null;
49 }
50
51 public void testSetName()
52 {
53 tCase.setName( "Test Case Name" );
54
55 assertEquals( "Test Case Name", tCase.getName() );
56 }
57
58 public void testSetTime()
59 {
60 tCase.setTime( .06f );
61
62 assertEquals( .06f, tCase.getTime(), 0.0 );
63 }
64
65 public void testSetFailure()
66 {
67 tCase.addFailure( "messageVal", "typeVal" );
68
69 assertEquals( "messageVal", tCase.getFailure().get( "message" ) );
70 assertEquals( "typeVal", tCase.getFailure().get( "type" ) );
71 }
72
73 public void testSetFullName()
74 {
75 tCase.setFullName( "Test Case Full Name" );
76
77 assertEquals( "Test Case Full Name", tCase.getFullName() );
78 }
79 }