summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk
diff options
context:
space:
mode:
authorManoop Talasila <talasila@research.att.com>2018-10-09 19:21:00 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-09 19:21:00 +0000
commit8508b1432c0172fa0974d3718f458efbf6c2575a (patch)
treedb8bb13e967d396930bfc77c3059f9865b4ff10e /ecomp-sdk
parentc22105a113af6072b4d75aee93d9ca50bf5da7ab (diff)
parentb1eff0514fe117cb1fef666c10f516f5b9ac95e2 (diff)
Merge "added test cases to RowHeaderColTest"
Diffstat (limited to 'ecomp-sdk')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/test/java/org/onap/portalsdk/analytics/view/RowHeaderColTest.java63
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(), "&nbsp;");
- 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(), "&nbsp;");
+ assertEquals(rowHeaderCol.getColumnWidthHtml(), "");
+ assertEquals(rowHeaderCol.getAlignmentHtml(), " align=center");
- }
+ }
}