* ===================================================================
* 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");
import java.util.Vector;
+import org.junit.Before;
import org.junit.Test;
public class DataRowTest {
+ private DataRow dataRow;
+ private Vector vc;
+ @Before
+ public void setUp()
+ {
+ dataRow = new DataRow();
- @Test
- public void mockDataRowTest() {
- DataRow dataRow = new DataRow();
+ DataValue dataValue = new DataValue();
+ dataRow.setRowFormat(false);
+ HtmlFormatter formatter = new HtmlFormatter();
+ dataRow.setRowFormatter(formatter);
+ dataRow.setRowNum(1);
+ vc = new Vector<>();
+ vc.add(dataRow);
+ dataRow.setRowValues(vc);
+ dataRow.setFormatId("test");
+ }
- DataValue dataValue = new DataValue();
- dataRow.setRowFormat(false);
- HtmlFormatter formatter = new HtmlFormatter();
- dataRow.setRowFormatter(formatter);
- dataRow.setRowNum(1);
- Vector vc = new Vector<>();
- vc.add(dataRow);
- dataRow.setRowValues(vc);
- dataRow.setFormatId("test");
- assertEquals(dataRow.getFormatId(), "test");
- assertEquals(dataRow.getRowNum(), 1);
- assertEquals(dataRow.getRowValues(), vc);
- }
+ @Test
+ public void mockDataRowTest() {
+
+ assertEquals(dataRow.getFormatId(), "test");
+ assertEquals(dataRow.getRowNum(), 1);
+ assertEquals(dataRow.getRowValues(), vc);
+ }
+
+ @Test
+ public void testGetBgColorHtml() {
+
+ String s=dataRow.getBgColorHtml();
+ assertNotNull(s);
+ }
+
+ @Test
+ public void testGetDataValue()
+ {
+ String s=dataRow.getDataValue("testColId");
+ assertNull(s);
+ }
}