Skip to content

Commit

Permalink
use assertXmlEquals for comparing xml strings
Browse files Browse the repository at this point in the history
  • Loading branch information
brozow committed Aug 13, 2014
1 parent 544bfe3 commit a0f1323
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -1304,7 +1304,7 @@ public void testEmptySnmpConfigAddDefinitionWhichMatchesDefaults() throws IOExce
"<snmp-config port=\"161\" retry=\"3\" timeout=\"800\" read-community=\"public\" version=\"v2c\" xmlns=\"http://xmlns.opennms.org/xsd/config/snmp\"/>\n";

SnmpPeerFactory.setInstance(new SnmpPeerFactory(snmpConfigXml));
assertEquals(snmpConfigXml, SnmpPeerFactory.marshallConfig());
assertXmlEquals(snmpConfigXml, SnmpPeerFactory.marshallConfig());

SnmpEventInfo info = new SnmpEventInfo();
info.setVersion("v2c");
Expand All @@ -1314,7 +1314,7 @@ public void testEmptySnmpConfigAddDefinitionWhichMatchesDefaults() throws IOExce
SnmpPeerFactory.getInstance().define(info);

String actualConfig = SnmpPeerFactory.marshallConfig();
assertEquals(expectedConfig, actualConfig);
assertXmlEquals(expectedConfig, actualConfig);
}


Expand All @@ -1339,7 +1339,7 @@ public void testMaxRepetitionsAndMaxVarsPerPdu() throws IOException {


SnmpPeerFactory.setInstance(new SnmpPeerFactory(snmpConfigXml));
assertEquals(snmpConfigXml, SnmpPeerFactory.marshallConfig());
assertXmlEquals(snmpConfigXml, SnmpPeerFactory.marshallConfig());

SnmpEventInfo info = new SnmpEventInfo();
info.setVersion("v2c");
Expand All @@ -1350,7 +1350,7 @@ public void testMaxRepetitionsAndMaxVarsPerPdu() throws IOException {
SnmpPeerFactory.getInstance().define(info);

String actualConfig = SnmpPeerFactory.marshallConfig();
assertEquals(expectedConfig, actualConfig);
assertXmlEquals(expectedConfig, actualConfig);
}

/**
Expand Down

0 comments on commit a0f1323

Please sign in to comment.