OpenKeyWord  Build_ID: 457, Datum: 01.02.2020 07:45:48
Dont repeat yourself. - Do it once and only once!
LogTestcase.java
1 package okw.log.log2html;
2 
3 public class LogTestcase extends LogBaseNode
4 {
5 
6  private String name = "";
7  private String type = "TestCase";
8 
9  protected LogTestcase( LogBase Parent, String fpsTestcaseName )
10  {
11  setParent(Parent);
12  myID = AllCount;
13 
14  this.name = fpsTestcaseName;
15 
16 
17  // inkrementieren TestcaseCount
18  this.TestcaseCount();
19  }
20 
21 
22  @Override
23  protected void ErrorCount()
24  {
25  ErrorCount++;
26 
27  this.TestcaseFail();
28 
29  this.bError = true;
30 
31  if ( myParent != null)
32  {
33  myParent.ErrorCount();
34  }
35  }
36 
37 
38  @Override
39  protected void ExceptionCount()
40  {
41  ExceptionCount++;
42 
43  this.TestcaseFail();
44 
45  this.bException = true;
46 
47  if ( myParent != null)
48  {
49  myParent.ExceptionCount();
50  }
51  }
52 
53  @Override
54  protected void TestcaseFail()
55  {
56  if ( ! (this.bError || this.bException ) )
57  myParent.TestcaseFail();
58  }
59 
60 
61  @Override
62  protected String getJSONNodeProperties()
63  {
64  StringBuilder myJSON = new StringBuilder();
65 
66  myJSON.append(this.jsonElementComma( "name", this.name ));
67  myJSON.append(this.jsonElementComma( "type", this.type ));
68 
69  return myJSON.toString();
70  }
71 }
okw.log.log2html.LogBaseNode
Definition: LogBaseNode.java:3
okw.log.log2html.LogTestcase
Definition: LogTestcase.java:3
okw.log.log2html.LogBase
Definition: LogBase.java:7