public class TestXSSFBorder extends TestCase {
public void testGetBorderStyle() {
CTStylesheet stylesheet = CTStylesheet.Factory.newInstance();
CTBorder border = stylesheet.addNewBorders().addNewBorder();
CTBorderPr top = border.addNewTop();
CTBorderPr right = border.addNewRight();
CTBorderPr bottom = border.addNewBottom();
top.setStyle(STBorderStyle.DASH_DOT);
right.setStyle(STBorderStyle.NONE);
bottom.setStyle(STBorderStyle.THIN);
XSSFCellBorder cellBorderStyle = new XSSFCellBorder(border);
assertEquals("dashDot", cellBorderStyle.getBorderStyle(BorderSide.TOP).toString());
assertEquals("none", cellBorderStyle.getBorderStyle(BorderSide.RIGHT).toString());
assertEquals(1, cellBorderStyle.getBorderStyle(BorderSide.RIGHT).intValue());
assertEquals("thin", cellBorderStyle.getBorderStyle(BorderSide.BOTTOM).toString());