Package org.apache.wink.test.diff

Examples of org.apache.wink.test.diff.DiffIgnoreUpdateWithAttributeQualifier


        AtomFeed.marshal(actualFeed, actualOS);

        Document expectedXml = TestUtils.getXML(expectedOS.toByteArray());
        Document actualXml = TestUtils.getXML(actualOS.toByteArray());

        DiffIgnoreUpdateWithAttributeQualifier diff =
            new DiffIgnoreUpdateWithAttributeQualifier(expectedXml, actualXml);
        if (diff.similar()) {
            return null;
        }
        System.err.println("Expected:\r\n" + TestUtils.printPrettyXML(expectedXml));
        System.err.println("Actual:\r\n" + TestUtils.printPrettyXML(actualXml));
        return diff.toString();
    }
View Full Code Here


    public static String diffIgnoreUpdateWithAttributeQualifier(String expectedFileName,
                                                                byte[] actual,
                                                                Class<?> cls) throws Exception {
        Document xmlExpected = getXML(expectedFileName, cls);
        Document xmlActual = getXML(actual);
        Diff diff = new DiffIgnoreUpdateWithAttributeQualifier(xmlExpected, xmlActual);
        if (diff.similar()) {
            return null;
        }
        System.err.println("Expected:\r\n" + TestUtils.printPrettyXML(xmlExpected));
        System.err.println("Actual:\r\n" + TestUtils.printPrettyXML(xmlActual));
        return diff.toString();
    }
View Full Code Here

   
    public static String diffIgnoreUpdateWithAttributeQualifier(byte[] expected, byte[] actual)
        throws Exception {
        Document xmlExpected = getXML(expected);
        Document xmlActual = getXML(actual);
        Diff diff = new DiffIgnoreUpdateWithAttributeQualifier(xmlExpected, xmlActual);
        if (diff.similar()) {
            return null;
        }
        System.err.println("Expected:\r\n" + TestUtils.printPrettyXML(xmlExpected));
        System.err.println("Actual:\r\n" + TestUtils.printPrettyXML(xmlActual));
        return diff.toString();
    }
View Full Code Here

            expectedSerialization = readCategoriesDocumentFromFile();
        } catch (IOException e) {
            fail("Failed to read " + ATOM_CATEGORIES_DUCUMENT);
        }

        DiffIgnoreUpdateWithAttributeQualifier diff;
        try {
            diff = new DiffIgnoreUpdateWithAttributeQualifier(expectedSerialization, content);
        } catch (Exception e) {
            fail("Failed to perform diff");
            throw e;
        }

        assertTrue("Expected atom feed documents to be similar" + " "
            + diff.toString()
            + "\nexpected:\n"
            + expectedSerialization
            + "\nresult:\n"
            + content, diff.similar());
    }
View Full Code Here

            expectedSerialization = readCategoriesDocumentFromFile();
        } catch (IOException e) {
            fail("Failed to read " + ATOM_CATEGORIES_DUCUMENT);
        }

        DiffIgnoreUpdateWithAttributeQualifier diff;
        try {
            diff = new DiffIgnoreUpdateWithAttributeQualifier(expectedSerialization, content);
        } catch (Exception e) {
            fail("Failed to perform diff");
            throw e;
        }

        assertTrue("Expected atom feed documents to be similar" + " "
            + diff.toString()
            + "\nexpected:\n"
            + expectedSerialization
            + "\nresult:\n"
            + content, diff.similar());
    }
View Full Code Here

        AtomFeed.marshal(actualFeed, actualOS);

        Document expectedXml = TestUtils.getXML(expectedOS.toByteArray());
        Document actualXml = TestUtils.getXML(actualOS.toByteArray());

        DiffIgnoreUpdateWithAttributeQualifier diff =
            new DiffIgnoreUpdateWithAttributeQualifier(expectedXml, actualXml);
        if (diff.similar()) {
            return null;
        }
        System.err.println("Expected:\r\n" + TestUtils.printPrettyXML(expectedXml));
        System.err.println("Actual:\r\n" + TestUtils.printPrettyXML(actualXml));
        return diff.toString();
    }
View Full Code Here

            expectedSerialization = readCategoriesDocumentFromFile();
        } catch (IOException e) {
            fail("Failed to read " + ATOM_CATEGORIES_DUCUMENT);
        }

        DiffIgnoreUpdateWithAttributeQualifier diff;
        try {
            diff = new DiffIgnoreUpdateWithAttributeQualifier(expectedSerialization, content);
        } catch (Exception e) {
            fail("Failed to perform diff");
            throw e;
        }

        assertTrue("Expected atom feed documents to be similar" + " "
            + diff.toString()
            + "\nexpected:\n"
            + expectedSerialization
            + "\nresult:\n"
            + content, diff.similar());
    }
View Full Code Here

        AtomFeed.marshal(actualFeed, actualOS);

        Document expectedXml = TestUtils.getXML(expectedOS.toByteArray());
        Document actualXml = TestUtils.getXML(actualOS.toByteArray());

        DiffIgnoreUpdateWithAttributeQualifier diff =
            new DiffIgnoreUpdateWithAttributeQualifier(expectedXml, actualXml);
        if (diff.similar()) {
            return null;
        }
        System.err.println("Expected:\r\n" + TestUtils.printPrettyXML(expectedXml));
        System.err.println("Actual:\r\n" + TestUtils.printPrettyXML(actualXml));
        return diff.toString();
    }
View Full Code Here

        } catch (IOException e) {
            fail("Failed to read " + OPEN_SEARCH_DUCUMENT);
        }
        String resultSerialization = new String(os.toByteArray());

        DiffIgnoreUpdateWithAttributeQualifier diff;
        try {
            diff =
                new DiffIgnoreUpdateWithAttributeQualifier(expectedSerialization,
                                                           resultSerialization);
        } catch (Exception e) {
            fail("Failed to perform diff");
            throw e;
        }

        assertTrue("Expected open search documents to be similar" + " "
            + diff.toString()
            + "\nexpected:\n"
            + expectedSerialization
            + "\nresult:\n"
            + resultSerialization, diff.similar());

    }
View Full Code Here

    public static String diffIgnoreUpdateWithAttributeQualifier(String expectedFileName,
                                                                byte[] actual,
                                                                Class<?> cls) throws Exception {
        Document xmlExpected = getXML(expectedFileName, cls);
        Document xmlActual = getXML(actual);
        Diff diff = new DiffIgnoreUpdateWithAttributeQualifier(xmlExpected, xmlActual);
        if (diff.similar()) {
            return null;
        }
        System.err.println("Expected:\r\n" + TestUtils.printPrettyXML(xmlExpected));
        System.err.println("Actual:\r\n" + TestUtils.printPrettyXML(xmlActual));
        return diff.toString();
    }
View Full Code Here

TOP

Related Classes of org.apache.wink.test.diff.DiffIgnoreUpdateWithAttributeQualifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.