2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.sdc.asdctool.impl.validator.utils;
23 import org.junit.Test;
24 import org.openecomp.sdc.be.dao.jsongraph.GraphVertex;
28 public class ReportManagerTest {
31 public void testReportTaskEnd() throws Exception {
34 VertexResult result = null;
37 ReportManager.reportTaskEnd(vertexId, taskName, result);
41 public void testAddFailedVertex() throws Exception {
46 ReportManager.addFailedVertex(taskName, vertexId);
49 @Test(expected = NullPointerException.class)
50 public void testPrintValidationTaskStatus() throws Exception {
51 GraphVertex vertexScanned = null;
53 boolean success = false;
56 ReportManager.printValidationTaskStatus(vertexScanned, taskName, success);
59 @Test(expected = NullPointerException.class)
60 public void testWriteReportLineToFile() throws Exception {
64 ReportManager.writeReportLineToFile(message);
67 @Test(expected = NullPointerException.class)
68 public void testReportValidatorTypeSummary() throws Exception {
69 String validatorName = "";
70 Set<String> failedTasksNames = null;
71 Set<String> successTasksNames = null;
74 ReportManager.reportValidatorTypeSummary(validatorName, failedTasksNames, successTasksNames);
77 @Test(expected = NullPointerException.class)
78 public void testReportStartValidatorRun() throws Exception {
79 String validatorName = "";
80 int componenentsNum = 0;
83 ReportManager.reportStartValidatorRun(validatorName, componenentsNum);
86 @Test(expected = NullPointerException.class)
87 public void testReportStartTaskRun() throws Exception {
88 GraphVertex vertex = null;
92 ReportManager.reportStartTaskRun(vertex, taskName);
95 @Test(expected = NullPointerException.class)
96 public void testReportEndOfToolRun() throws Exception {
99 ReportManager.reportEndOfToolRun();
102 @Test(expected = NullPointerException.class)
103 public void testPrintAllResults() throws Exception {
106 ReportManager.printAllResults();