PercentageStyle implements DataStyle { @Override public boolean isHidden() { return this.floatStyle.isHidden(); } 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 testCountryLanguage() throws IOException { final PercentageStyle ps = new PercentageStyleBuilder("test", this.locale).country("a").language("b").visible() .build(); TestHelper.assertXMLEquals( "<number:percentage-style style:name=\"test\" number:language=\"b\" " + "number:country=\"A\" " + "style:volatile=\"true\">" + "<number:number number:decimal-places=\"2\" " + "number:min-integer-digits=\"1\"/>" + "<number:text>%</number:text>" + "</number:percentage-style>", ps); Assert.assertFalse(ps.isHidden()); }
@Test public final void testLocaleVolatile() throws IOException { final PercentageStyle ps = new PercentageStyleBuilder("test", this.locale).locale(Locale.FRANCE) .volatileStyle(true).build(); TestHelper.assertXMLEquals( "<number:percentage-style style:name=\"test\" number:language=\"fr\" " + "number:country=\"FR\" " + "style:volatile=\"true\">" + "<number:number number:decimal-places=\"2\" " + "number:min-integer-digits=\"1\"/>" + "<number:text>%</number:text>" + "</number:percentage-style>", ps); Assert.assertTrue(ps.isHidden()); }