/** * Sets the up. * * @throws Exception the exception */ @Before public void setUp() throws Exception { fileAnticipator = new FileAnticipator(); context = JAXBContext.newInstance(TcaDataCollectionConfig.class); marshaller = context.createMarshaller(); unmarshaller = context.createUnmarshaller(); TcaRrd rrd = new TcaRrd(); rrd.addRra("RRA:AVERAGE:0.5:1:3600"); rrd.addRra("RRA:AVERAGE:0.5:300:288"); rrd.addRra("RRA:MIN:0.5:300:288"); rrd.addRra("RRA:MAX:0.5:300:288"); rrd.addRra("RRA:AVERAGE:0.5:900:2880"); rrd.addRra("RRA:MIN:0.5:900:2880"); rrd.addRra("RRA:MAX:0.5:900:2880"); rrd.addRra("RRA:AVERAGE:0.5:3600:4300"); rrd.addRra("RRA:MIN:0.5:3600:4300"); rrd.addRra("RRA:MAX:0.5:3600:4300"); TcaDataCollection tcadc = new TcaDataCollection(); tcadc.setName("default"); tcadc.setRrd(rrd); tcadcc = new TcaDataCollectionConfig(); tcadcc.addDataCollection(tcadc); tcadcc.setRrdRepository("target/snmp/"); XMLUnit.setIgnoreWhitespace(true); XMLUnit.setIgnoreAttributeOrder(true); XMLUnit.setNormalize(true); }
private boolean isdifferent(Document testDoc, Document controlDoc) { boolean isdifferent = false; XMLUnit.setIgnoreWhitespace(true); XMLUnit.setIgnoreComments(true); XMLUnit.setNormalize(true); Diff myDiff = new Diff(controlDoc, testDoc); DetailedDiff myComparisonController = new DetailedDiff(myDiff); DifferenceEngine engine = new DifferenceEngine(myComparisonController); XmlDifferenceListener listener = new XmlDifferenceListener(); ElementNameAndAttributeQualifier myElementQualifier = new ElementNameAndAttributeQualifier(); try { // debug engine.compare( controlDoc.getDocumentElement(), testDoc.getDocumentElement(), listener, myElementQualifier); } catch (NullPointerException ne) { LOG.error("NPE: " + ne.getMessage(), ne); } isdifferent = listener.called(); return isdifferent; }
@Before public void setUp() throws Exception { XMLUnit.setIgnoreComments(true); XMLUnit.setIgnoreWhitespace(true); XMLUnit.setIgnoreAttributeOrder(true); XMLUnit.setNormalizeWhitespace(true); XMLUnit.setNormalize(true); }
@Before public void setUp() { MockLogAppender.setupLogging(true); XMLUnit.setIgnoreWhitespace(true); XMLUnit.setIgnoreAttributeOrder(true); XMLUnit.setIgnoreComments(true); XMLUnit.setIgnoreDiffBetweenTextAndCDATA(true); XMLUnit.setNormalize(true); }