1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.plugins.surefire.report;
20
21 import junit.framework.TestCase;
22
23
24
25
26 @SuppressWarnings("checkstyle:magicnumber")
27 public class ReportTestCaseTest extends TestCase {
28 private ReportTestCase tCase;
29
30
31
32
33 @Override
34 protected void setUp() throws Exception {
35 super.setUp();
36
37 tCase = new ReportTestCase();
38 }
39
40 public void testSetName() {
41 tCase.setName("Test Case Name");
42
43 assertEquals("Test Case Name", tCase.getName());
44 }
45
46 public void testSetTime() {
47 tCase.setTime(.06f);
48
49 assertEquals(.06f, tCase.getTime(), 0.0);
50 }
51
52 public void testSetFailure() {
53 tCase.setFailure("messageVal", "typeVal");
54
55 assertEquals("messageVal", tCase.getFailureMessage());
56 assertEquals("typeVal", tCase.getFailureType());
57 }
58
59 public void testSetFullName() {
60 tCase.setFullName("Test Case Full Name");
61
62 assertEquals("Test Case Full Name", tCase.getFullName());
63 }
64 }