View Javadoc

1   package org.apache.maven.plugins.surefire.report;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.util.HashMap;
23  import java.util.Map;
24  
25  /**
26   *
27   */
28  public class ReportTestCase
29  {
30      private String fullClassName;
31  
32      private String className;
33  
34      private String fullName;
35  
36      private String name;
37  
38      private float time;
39  
40      private Map<String, Object> failure;
41  
42      public String getName()
43      {
44          return name;
45      }
46  
47      public void setName( String name )
48      {
49          this.name = name;
50      }
51  
52      public String getFullClassName()
53      {
54          return fullClassName;
55      }
56  
57      public void setFullClassName( String name )
58      {
59          this.fullClassName = name;
60      }
61  
62      public String getClassName()
63      {
64          return className;
65      }
66  
67      public void setClassName( String name )
68      {
69          this.className = name;
70      }
71  
72      public float getTime()
73      {
74          return time;
75      }
76  
77      public void setTime( float time )
78      {
79          this.time = time;
80      }
81  
82      public Map<String, Object> getFailure()
83      {
84          return failure;
85      }
86  
87      public String getFullName()
88      {
89          return fullName;
90      }
91  
92      public void setFullName( String fullName )
93      {
94          this.fullName = fullName;
95      }
96  
97      public void addFailure( String message, String type )
98      {
99          failure = new HashMap<String, Object>();
100         failure.put( "message", message );
101         failure.put( "type", type );
102     }
103 
104     /**
105      * {@inheritDoc}
106      */
107     public String toString()
108     {
109         return fullName;
110     }
111 }