@Test
public void testParamFillingStyle() throws ParseException {
IShape sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle =gradient]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
if(sh.isFillable()) {
assertTrue(sh.hasGradient());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$
assertFalse(sh.isFilled());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(FillingStyle.CLINES, sh.getFillingStyle());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=clines*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(FillingStyle.CLINES_PLAIN, sh.getFillingStyle());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=hlines*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(FillingStyle.HLINES_PLAIN, sh.getFillingStyle());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=hlines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(FillingStyle.HLINES, sh.getFillingStyle());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=vlines*]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(FillingStyle.VLINES_PLAIN, sh.getFillingStyle());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=vlines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(FillingStyle.VLINES, sh.getFillingStyle());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=none]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(FillingStyle.NONE, sh.getFillingStyle());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=gradient,fillstyle=clines]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(FillingStyle.CLINES, sh.getFillingStyle());
assertTrue(PSTParser.errorLogs().isEmpty());
sh = parser.parsePSTCode("\\"+getCommandName()+"[fillstyle=solid]"+getBasicCoordinates()).get().getShapeAt(0); //$NON-NLS-1$ //$NON-NLS-2$
assertEquals(FillingStyle.PLAIN, sh.getFillingStyle());
assertTrue(sh.isFilled());
assertTrue(PSTParser.errorLogs().isEmpty());
}
}