PercentageStyle implements DataStyle { @Override public void addToElements(final OdsElements odsElements) { odsElements.addDataStyle(this); } PercentageStyle(final FloatStyle floatStyle); @Override void appendXMLContent(final XMLUtil util, final Appendable appendable); @Override String getName(); @Override boolean isHidden(); @Override void addToElements(final OdsElements odsElements);  }
@Test public final void testMinIntegerDigits() throws IOException { final PercentageStyle ps = new PercentageStyleBuilder("test", this.locale).minIntegerDigits(8).build(); final OdsElements elements = PowerMock.createMock(OdsElements.class); PowerMock.resetAll(); EasyMock.expect(elements.addDataStyle(ps)).andReturn(true); PowerMock.replayAll(); ps.addToElements(elements); PowerMock.verifyAll(); TestHelper.assertXMLEquals( "<number:percentage-style style:name=\"test\" number:language=\"en\" " + "number:country=\"US\" " + "style:volatile=\"true\">" + "<number:number number:decimal-places=\"2\" " + "number:min-integer-digits=\"8\"/>" + "<number:text>%</number:text>" + "</number:percentage-style>", ps); }
@Test public final void testAddToElements() { final PercentageStyle ps = new PercentageStyleBuilder("test", this.locale).build(); DataStyleTestHelper.testAddToElements(ps); }