}
@Test
<<<<<<< HEAD
public void testSerialization4() throws Exception {
DummyProbe p = new DummyProbe();
p.configure();
Document d = p.dumpAsXml();
Util.serialize(d, System.out, null, null);
URL xsl = ResourcesLocator.getResourceUrl("/jrds/xmlResources/probe.xsl");
Assert.assertNotNull("xls transformation not found", xsl);
ByteArrayOutputStream out = new ByteArrayOutputStream();
out.reset();
Util.serialize(d, out, xsl, null);
String outBuffer = out.toString();
logger.debug("testSerialization4: " + outBuffer);
Assert.assertTrue("HTML doctype not found", outBuffer.contains("DOCTYPE html"));
Assert.assertTrue("probe id not found in HTML", outBuffer.contains("pid=" + p.hashCode()));
for(String dsName: p.getPd().getDs()) {
Assert.assertTrue(outBuffer.contains("dsName=" + dsName));
}
}
@Test
=======
>>>>>>> cc35101c4c5836fe391a768aff64d5b2dde0781a
public void testParseStringNumber1() {
double n = Util.parseStringNumber("1", Double.NaN);
Assert.assertEquals(1.0, n, 0.001); |