aboutsummaryrefslogtreecommitdiffstats
path: root/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/ExtentTestManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/ExtentTestManager.java')
-rw-r--r--ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/ExtentTestManager.java65
1 files changed, 32 insertions, 33 deletions
diff --git a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/ExtentTestManager.java b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/ExtentTestManager.java
index 4d28e9a8b4..295abbe8ac 100644
--- a/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/ExtentTestManager.java
+++ b/ui-ci/src/main/java/org/openecomp/sdc/ci/tests/execute/setup/ExtentTestManager.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,41 +26,40 @@ import org.openecomp.sdc.ci.tests.api.SomeInterface;
import java.util.HashMap;
-public class ExtentTestManager implements SomeInterface{
+public class ExtentTestManager implements SomeInterface {
- private static HashMap<Long, ExtentTest> extentTestMap = new HashMap<Long, ExtentTest>();
- private static ExtentReports extent = ExtentManager.getReporter();
-
- public ExtentTestManager(){
-
- }
-
- @Override
- public synchronized ExtentTest getTest() {
- return extentTestMap.get(Thread.currentThread().getId());
- }
+ private static HashMap<Long, ExtentTest> extentTestMap = new HashMap<Long, ExtentTest>();
+ private static ExtentReports extent = ExtentManager.getReporter();
- public static synchronized void endTest() {
-// extent.endTest(extentTestMap.get(Thread.currentThread().getId()));
- extent.flush();
- }
+ public ExtentTestManager() {
- public static synchronized ExtentTest startTest(String testName) {
- return startTest(testName, "");
- }
+ }
- public static synchronized ExtentTest startTest(String testName, String desc) {
- ExtentTest test = extent.createTest(testName, desc);
- extentTestMap.put(Thread.currentThread().getId(), test);
+ @Override
+ public synchronized ExtentTest getTest() {
+ return extentTestMap.get(Thread.currentThread().getId());
+ }
- return test;
- }
-
- public static synchronized <T> void assignCategory(Class<T> clazz){
- String[] parts = clazz.getName().split("\\.");
- String lastOne1 = parts[parts.length-1];
- String lastOne2 = parts[parts.length-2];
- extentTestMap.get(Thread.currentThread().getId()).assignCategory(lastOne2 + "-" + lastOne1);
- }
+ public static synchronized void endTest() {
+ extent.flush();
+ }
+
+ public static synchronized ExtentTest startTest(String testName) {
+ return startTest(testName, "");
+ }
+
+ public static synchronized ExtentTest startTest(String testName, String desc) {
+ ExtentTest test = extent.createTest(testName, desc);
+ extentTestMap.put(Thread.currentThread().getId(), test);
+
+ return test;
+ }
+
+ public static synchronized <T> void assignCategory(Class<T> clazz) {
+ String[] parts = clazz.getName().split("\\.");
+ String lastOne1 = parts[parts.length - 1];
+ String lastOne2 = parts[parts.length - 2];
+ extentTestMap.get(Thread.currentThread().getId()).assignCategory(lastOne2 + "-" + lastOne1);
+ }
}