Search in sources :

Example 1 with ChangesXMLRuntimeException

use of org.apache.maven.plugins.changes.ChangesXMLRuntimeException in project maven-plugins by apache.

the class ChangesXMLTest method testParseInvalidChangesFile.

public void testParseInvalidChangesFile() {
    File changesFile = new File(getBasedir() + "/src/test/unit/invalid-changes.xml");
    try {
        new ChangesXML(changesFile, new MockLog());
        fail("Should have thrown a ChangesXMLRuntimeException due to the invalid changes.xml file");
    } catch (ChangesXMLRuntimeException e) {
        assertEquals("An error occurred when parsing the changes.xml file", e.getMessage());
    } catch (Throwable e) {
        fail("Wrong type of Throwable object was thrown, expected ChangesXMLRuntimeException");
    }
}
Also used : ChangesXML(org.apache.maven.plugins.changes.ChangesXML) File(java.io.File) ChangesXMLRuntimeException(org.apache.maven.plugins.changes.ChangesXMLRuntimeException)

Aggregations

File (java.io.File)1 ChangesXML (org.apache.maven.plugins.changes.ChangesXML)1 ChangesXMLRuntimeException (org.apache.maven.plugins.changes.ChangesXMLRuntimeException)1