Package org.cafesip.sipunit

Examples of org.cafesip.sipunit.PresenceSubscriber.format()


        assertEquals(0, getAlicePhone().getRetiredBuddies().size());
        assertEquals(getBobUri(), s.getTargetUri());
        assertNotNull(getAlicePhone().getBuddyInfo(getBobUri())); // call anytime to get
        // Subscription           
        assertEquals(SipResponse.OK, s.getReturnCode());
        assertTrue(s.format(), s.processResponse(1000));

        // check the response processing results
        assertTrue(s.isSubscriptionActive());
       
        assertTrue(s.getTimeLeft() <= 60);
View Full Code Here


                .getHeader(SubscriptionStateHeader.NAME)).getExpires());

        // process the NOTIFY
        response = s.processNotify(reqevent);
        // reply to the NOTIFY
        assertTrue(s.format(), s.replyToNotify(reqevent, response));

        // check PRESENCE info - devices/tuples
        // -----------------------------------------------
        HashMap<String, PresenceDeviceInfo> devices = s.getPresenceDevices();
        assertEquals(1, devices.size());
View Full Code Here

        Request publish = publishSession.newPublish(getClass().getResourceAsStream("publish1.xml"), 20);
        publishSession.sendRequest(publish, SipResponse.OK);

        // get the NOTIFY
        reqevent = s.waitNotify(10000);
        assertNotNull(s.format(), reqevent);
        assertNoSubscriptionErrors(s);

        // examine the request object
        request = reqevent.getRequest();
        assertEquals(Request.NOTIFY, request.getMethod());
View Full Code Here

        assertNoSubscriptionErrors(s);

        // End subscription
        assertTrue(s.removeBuddy(5000));
        reqevent = s.waitNotify(10000);
        assertNotNull(s.format(), reqevent);
        response = s.processNotify(reqevent);
        assertEquals(Response.OK, response.getStatusCode());
        assertTrue(s.replyToNotify(reqevent, response));
       
        assertTrue(s.isSubscriptionTerminated())
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.