Package com.soashable.robotolympics.challenge

Examples of com.soashable.robotolympics.challenge.Challenge


        challengeMap.get(key).getPackets().add(packet);
    }

    public Packet createChallenge(Packet packet, Session session) {
        String challengeId = makeChallengeId(packet);
        Challenge challenge = challengeGenerator.nextChallenge();
        String question = challenge.getChallenge();
       

        ChallengeExtension challengeExt = new ChallengeExtension();
        challengeExt.setFrom(packet.getTo().toString());
        challengeExt.setChallengeId(challengeId);
View Full Code Here


    public void testCreateChallenge() {
        Packet challengePacket = challengeManager.createChallenge(message, session);
        String packetBody = ((Message)challengePacket).getBody();
       
        String challengeId = challengeManager.makeChallengeId(message);
        Challenge challenge = challengeManager.getChallenge( message );
        String challengeString = challenge.getChallenge();
       
        assertEquals( "The chalenge must come from the original recipient", message.getTo(), challengePacket.getFrom() );
       
        assertNotNull( "Challenge does not have extension", challengePacket.getExtension( ChallengeExtension.ELEMENT_NAME, ChallengeExtension.NAMESPACE ) );
       
View Full Code Here

TOP

Related Classes of com.soashable.robotolympics.challenge.Challenge

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.