1 package org.apache.maven.surefire.suite;
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 public class RunResultTest
28 extends TestCase
29 {
30 public void testGetAsString()
31 throws Exception
32 {
33
34 }
35
36 public void testFromString()
37 throws Exception
38 {
39 RunResult original = new RunResult( 4,3,2,1, true,false);
40 final String asString = original.getAsString();
41 final RunResult runResult = RunResult.fromString( asString );
42 verifySame( original, runResult );
43 }
44 public void testFromString2()
45 throws Exception
46 {
47 RunResult original = new RunResult( 5,6,7,8, false,true );
48 final String asString = original.getAsString();
49 final RunResult runResult = RunResult.fromString( asString );
50 verifySame( original, runResult );
51 }
52
53 private void verifySame( RunResult original, RunResult runResult )
54 {
55 assertEquals( original.getCompletedCount(), runResult.getCompletedCount());
56 assertEquals( original.getErrors(), runResult.getErrors() );
57 assertEquals( original.getFailures(), runResult.getFailures());
58 assertEquals( original.getSkipped(), runResult.getSkipped());
59 assertEquals( original.isFailure(), runResult.isFailure());
60 assertEquals( original.isTimeout(), runResult.isTimeout());
61 }
62 }