1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-25 20:18:00 +01:00

Rename XmlUnitUtils to XmlAssertUtil

This commit is contained in:
Florian Schmaus 2020-06-14 16:53:21 +02:00
parent 9d6665735f
commit 18c2c37ad0
36 changed files with 40 additions and 41 deletions

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smack.compress.packet;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import java.io.IOException;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smack.packet;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smack.packet;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smack.provider;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import java.io.IOException;

View file

@ -16,8 +16,8 @@
*/
package org.jivesoftware.smack.util;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlNotSimilar;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlNotSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;

View file

@ -18,7 +18,7 @@ package org.jivesoftware.smack.util;
import org.jivesoftware.smack.packet.StandardExtensionElement;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.test.util.XmlUnitUtils;
import org.jivesoftware.smack.test.util.XmlAssertUtil;
import org.junit.jupiter.api.Test;
@ -38,10 +38,10 @@ public class XmlStringBuilderTest {
String expectedXml = "<outer xmlns='outer-namespace'><inner xmlns='inner-namespace'></inner><inner xmlns='inner-namespace'></inner></outer>";
XmlStringBuilder actualXml = outer.toXML(XmlEnvironment.EMPTY);
XmlUnitUtils.assertXmlSimilar(expectedXml, actualXml);
XmlAssertUtil.assertXmlSimilar(expectedXml, actualXml);
StringBuilder actualXmlTwo = actualXml.toXML(XmlEnvironment.EMPTY);
XmlUnitUtils.assertXmlSimilar(expectedXml, actualXmlTwo);
XmlAssertUtil.assertXmlSimilar(expectedXml, actualXmlTwo);
}
}

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2014-2019 Florian Schmaus
* Copyright 2014-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -26,8 +26,7 @@ import org.xmlunit.diff.DefaultNodeMatcher;
import org.xmlunit.diff.ElementSelectors;
import org.xmlunit.input.NormalizedSource;
// TODO: Rename this class to XmlAssertUtil
public class XmlUnitUtils {
public class XmlAssertUtil {
public static void assertXmlNotSimilar(CharSequence xmlOne, CharSequence xmlTwo) {
normalizedCompare(xmlOne, xmlTwo).areNotSimilar();

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.httpfileupload;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.IOException;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.httpfileupload;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.httpfileupload.provider;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.net.MalformedURLException;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.mam;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.jivesoftware.smack.packet.StreamOpen;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.message_fastening;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.message_markup;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.message_retraction.element;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.io.IOException;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.message_retraction.element;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.io.IOException;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.reference;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.sid;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.spoiler;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.attention;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import org.jivesoftware.smackx.attention.packet.AttentionExtension;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.bytestreams.ibb.packet;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.bytestreams.ibb.packet;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.bytestreams.ibb.packet;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.Mockito.mock;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.bytestreams.ibb.packet;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.last_interaction;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.mood;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.mood;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNull;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.nick;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.pubsub;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import java.io.IOException;
import java.util.ArrayList;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.pubsub;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.softwareinfo;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.usertune;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import java.io.IOException;
import java.net.URI;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.xdata;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import org.junit.jupiter.api.Test;
import org.jxmpp.jid.JidTestUtil;

View file

@ -18,7 +18,7 @@ package org.jivesoftware.smackx.ox;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.IOException;

View file

@ -17,7 +17,7 @@
package org.jivesoftware.smackx.ox;
import static junit.framework.TestCase.assertEquals;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import java.io.IOException;
import java.text.ParseException;

View file

@ -17,7 +17,7 @@
package org.jivesoftware.smackx.ox;
import static junit.framework.TestCase.assertEquals;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import java.util.Date;

View file

@ -17,7 +17,7 @@
package org.jivesoftware.smackx.ox;
import static junit.framework.TestCase.assertTrue;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.jivesoftware.smack.test.util.XmlAssertUtil.assertXmlSimilar;
import java.nio.charset.Charset;
import java.util.Arrays;