diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2018-09-26 17:07:23 +0530 |
---|---|---|
committer | Sandeep Jha <sandeejh@in.ibm.com> | 2018-09-27 07:16:02 +0000 |
commit | b1eff0514fe117cb1fef666c10f516f5b9ac95e2 (patch) | |
tree | dac0e3eca94d8113c4c554ddb9a013bef69c3e51 | |
parent | afb7e4d6b9895146d5d7e27a7568a6360ca50ce3 (diff) |
added test cases to RowHeaderColTest
to increase code coverage
Issue-ID: PORTAL-273
Change-Id: I9d556757af86ac039caa3ccf9874d176d8808a7f
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/view/RowHeaderColTest.java | 63 |
1 files changed, 36 insertions, 27 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/view/RowHeaderColTest.java b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/view/RowHeaderColTest.java index 180abf02..932a4e75 100644 --- a/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/view/RowHeaderColTest.java +++ b/ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/view/RowHeaderColTest.java @@ -4,6 +4,8 @@ * =================================================================== * Copyright © 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== + * Modifications Copyright © 2018 IBM. + * =================================================================== * * Unless otherwise specified, all software contained herein is licensed * under the Apache License, Version 2.0 (the "License"); @@ -35,6 +37,7 @@ * * */ + package org.onap.portalsdk.analytics.view; import static org.junit.Assert.*; @@ -43,33 +46,39 @@ import org.junit.Test; public class RowHeaderColTest { - @Test - public void mockRowHeaderColTest() { - RowHeaderCol rowHeaderCol = new RowHeaderCol(); - rowHeaderCol.setColumnTitle("columnTitle"); - rowHeaderCol.setColumnWidth("columnWidth"); - rowHeaderCol.setAlignment("alignment"); - rowHeaderCol.setColId("colId"); - rowHeaderCol.setDisplayHeaderAlignment(null); - assertNull(rowHeaderCol.getDisplayHeaderAlignment()); - assertEquals(rowHeaderCol.getColId(), "colId"); - assertEquals(rowHeaderCol.getColumnTitle(), "columnTitle"); - assertEquals(rowHeaderCol.getColumnWidth(), "columnWidth"); - assertEquals(rowHeaderCol.getAlignment(), "alignment"); - assertEquals(rowHeaderCol.getColumnTitleHtml(), "columnTitle"); - assertEquals(rowHeaderCol.getColumnWidthHtml(), " width=columnWidth"); - assertEquals(rowHeaderCol.getAlignmentHtml(), " align=alignment"); - rowHeaderCol.resetNext(); - RowHeader rowHeader = new RowHeader(); - rowHeaderCol.addRowHeader(rowHeader); - rowHeaderCol.addRowHeader(1, rowHeader); - rowHeaderCol.setColumnTitle(""); - rowHeaderCol.setColumnWidth(""); - rowHeaderCol.setAlignment(""); - assertEquals(rowHeaderCol.getColumnTitleHtml(), " "); - assertEquals(rowHeaderCol.getColumnWidthHtml(), ""); - assertEquals(rowHeaderCol.getAlignmentHtml(), " align=center"); + @Test + public void mockRowHeaderColTest() { + RowHeaderCol rowHeaderCol = new RowHeaderCol(); + rowHeaderCol.setColumnTitle("columnTitle"); + rowHeaderCol.setColumnWidth("columnWidth"); + rowHeaderCol.setAlignment("alignment"); + rowHeaderCol.setColId("colId"); + rowHeaderCol.setDisplayHeaderAlignment(null); + rowHeaderCol.setNowrap("noWrap"); + rowHeaderCol.setVisible(true); + assertEquals("noWrap", rowHeaderCol.getNowrap()); + assertEquals(true, rowHeaderCol.isVisible()); + assertNull(rowHeaderCol.getDisplayHeaderAlignment()); + assertEquals(rowHeaderCol.getColId(), "colId"); + assertEquals(rowHeaderCol.getColumnTitle(), "columnTitle"); + assertEquals(rowHeaderCol.getColumnWidth(), "columnWidth"); + assertEquals(rowHeaderCol.getAlignment(), "alignment"); + assertEquals(rowHeaderCol.getColumnTitleHtml(), "columnTitle"); + assertEquals(rowHeaderCol.getColumnWidthHtml(), " width=columnWidth"); + assertEquals(rowHeaderCol.getAlignmentHtml(), " align=alignment"); + rowHeaderCol.resetNext(); + RowHeader rowHeader = new RowHeader(); + rowHeaderCol.addRowHeader(rowHeader); + rowHeaderCol.addRowHeader(1, rowHeader); + rowHeaderCol.setColumnTitle(""); + rowHeaderCol.setColumnWidth(""); + rowHeaderCol.setAlignment(""); + assertTrue(rowHeaderCol.hasNext()); + assertNotNull(rowHeaderCol.getNext()); + assertEquals(rowHeaderCol.getColumnTitleHtml(), " "); + assertEquals(rowHeaderCol.getColumnWidthHtml(), ""); + assertEquals(rowHeaderCol.getAlignmentHtml(), " align=center"); - } + } } |