Examples of nameEquals()


Examples of org.apache.vysper.xml.fragment.XMLElementVerifier.nameEquals()

        Stanza response = sessionContext.getNextRecordedResponse();

        XMLElementVerifier responseVerifier = response.getVerifier();
        // error might be wrapped within a stream opener
        if (responseVerifier.nameEquals("stream")) {
            responseVerifier = response.getFirstInnerElement().getVerifier();
        }

        assertTrue(responseVerifier.nameEquals("error"));
        assertTrue("error", responseVerifier.subElementPresent(StreamErrorCondition.UNSUPPORTED_STANZA_TYPE.value()));
View Full Code Here

Examples of org.apache.vysper.xml.fragment.XMLElementVerifier.nameEquals()

        // error might be wrapped within a stream opener
        if (responseVerifier.nameEquals("stream")) {
            responseVerifier = response.getFirstInnerElement().getVerifier();
        }

        assertTrue(responseVerifier.nameEquals("error"));
        assertTrue("error", responseVerifier.subElementPresent(StreamErrorCondition.UNSUPPORTED_STANZA_TYPE.value()));
        assertTrue(sessionContext.isClosed());
    }
}
View Full Code Here

Examples of org.apache.vysper.xml.fragment.XMLElementVerifier.nameEquals()

        openClientSession();

        Stanza recordedResponse = sessionContext.getNextRecordedResponse();
        XMLElementVerifier responseVerifier = recordedResponse.getVerifier();

        assertTrue(responseVerifier.nameEquals("stream"));

        assertTrue(responseVerifier.attributeEquals(NamespaceURIs.XML, "lang", "fr"));

        assertTrue("initiated => started", sessionContext.getState() == SessionState.STARTED);
    }
View Full Code Here

Examples of org.apache.vysper.xml.fragment.XMLElementVerifier.nameEquals()

        XMPPVersion versionSent = new IllegalXMPPVersion("IllV1.0");
        Stanza response = getVersionResponse(versionSent);

        XMLElementVerifier responseVerifier = response.getVerifier();
        assertTrue(responseVerifier.nameEquals("error"));
        assertTrue("error", responseVerifier.subElementPresent(StreamErrorCondition.UNSUPPORTED_VERSION.value()));
    }

    public void testProcessClientStreamOpeningResponse_Version_2_0() {
        sessionContext.setSessionState(getDefaultState());
View Full Code Here

Examples of org.apache.vysper.xml.fragment.XMLElementVerifier.nameEquals()

        XMPPVersion versionSent = new XMPPVersion(2, 0);
        Stanza response = getVersionResponse(versionSent);

        XMLElementVerifier responseVerifier = response.getVerifier();
        assertTrue(responseVerifier.nameEquals("error"));
        assertTrue("error", responseVerifier.subElementPresent(StreamErrorCondition.UNSUPPORTED_VERSION.value()));
    }

    protected Stanza getVersionResponse(XMPPVersion versionSent) {
        Stanza stanza = new ServerResponses().getStreamOpener(true, testFrom, null, versionSent, null).build();
View Full Code Here

Examples of org.apache.vysper.xml.fragment.XMLElementVerifier.nameEquals()

        protocolWorker.processStanza(sessionContext.getServerRuntimeContext(), sessionContext, stanzaBuilder.build(),
                sessionStateHolder);

        Stanza response = sessionContext.getNextRecordedResponse();
        XMLElementVerifier responseVerifier = response.getVerifier();
        assertTrue(responseVerifier.nameEquals("error"));
        assertTrue("error", responseVerifier.subElementPresent(StreamErrorCondition.INVALID_NAMESPACE.value()));

    }

    public void testDontAcceptIQStanzaWhileNotAuthenticated() {
View Full Code Here

Examples of org.apache.vysper.xmpp.stanza.XMPPCoreStanzaVerifier.nameEquals()

        TestIQHandler iqHandler = new TestIQHandler();
        ResponseStanzaContainer responseStanzaContainer = iqHandler.execute(stanzaBuilder.build(), sessionContext.getServerRuntimeContext(), true, sessionContext, null);
        IQStanza incomingStanza = iqHandler.getIncomingStanza();

        XMPPCoreStanzaVerifier verifier = incomingStanza.getCoreVerifier();
        assertTrue("iq", verifier.nameEquals("iq"));
        assertTrue("iq-id", verifier.attributeEquals("id", "1"));
        assertTrue("iq-type-get", verifier.attributeEquals("type", "get"));

        // response is "result"
        Stanza responseStanza = responseStanzaContainer.getResponseStanza();
View Full Code Here

Examples of org.apache.vysper.xmpp.stanza.XMPPCoreStanzaVerifier.nameEquals()

        ResponseStanzaContainer responseStanzaContainer = iqHandler.execute(stanzaBuilder.build(), sessionContext
                .getServerRuntimeContext(), true, sessionContext, null);
        IQStanza incomingStanza = iqHandler.getIncomingStanza();

        XMPPCoreStanzaVerifier verifier = incomingStanza.getCoreVerifier();
        assertTrue("iq", verifier.nameEquals("iq"));
        assertTrue("iq-id", verifier.attributeEquals("id", "1"));
        assertTrue("iq-type-get", verifier.attributeEquals("type", "get"));

        // response is "result"
        Stanza responseStanza = responseStanzaContainer.getResponseStanza();
View Full Code Here

Examples of org.jnode.vm.classmgr.VmType.nameEquals()

        } else {
            final VmType[] list = bootClasses;
            final int count = list.length;
            for (int i = 0; i < count; i++) {
                VmType vmClass = list[i];
                if (vmClass.nameEquals(name)) {
                    return vmClass;
                }
            }
            return null;
        }
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.