Package hudson.util

Examples of hudson.util.XStream2.fromXML()


     */
    @Test
    public void testUnmarshalOldData2() throws Exception {
        XStream xStream = new XStream2();
        xStream.registerConverter(new TriggerContextConverter());
        Object obj = xStream.fromXML(getClass().getResourceAsStream("retriggerAction_oldData2.xml"));
        assertTrue(obj instanceof RetriggerAction);
        RetriggerAction action = (RetriggerAction)obj;
        TriggerContext context = Whitebox.getInternalState(action, "context");
        assertNotNull(context.getEvent());
        assertThat("Event is not a ChangeBasedEvent", context.getEvent(), instanceOf(ChangeBasedEvent.class));
View Full Code Here


    @Test
    public void testUnmarshalOldMatrixBuild() throws Exception {
        XStream xStream = new XStream2();
        xStream.registerConverter(new TriggerContextConverter());
        xStream.alias("matrix-run", MatrixRun.class);
        Object obj = xStream.fromXML(getClass().getResourceAsStream("matrix_build.xml"));
        assertTrue(obj instanceof MatrixRun);
        MatrixRun run = (MatrixRun)obj;

        Cause.UpstreamCause upCause = run.getCause(Cause.UpstreamCause.class);
        List upstreamCauses = Whitebox.getInternalState(upCause, "upstreamCauses");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.