Package com.comcast.cns.model

Examples of com.comcast.cns.model.CNSMessage


    }
  }

  public static CNSMessage getMessage(String msg, CNSMessageStructure structure, String subject, String topicArn, String userId) {
   
    CNSMessage message = new CNSMessage();
        message.setTimestamp(new Date());
    message.setMessage(msg);
    message.setMessageStructure(structure);
    message.setSubject(subject);
    message.setTopicArn(topicArn);
    message.setUserId(userId);
    message.setMessageId("test-message-id1");
   
    return message;
  }
View Full Code Here


  }

  @Test
  public void testSerializeAndDeserializeMessage() {

    CNSMessage p1 = getMessage("test", CNSMessageStructure.json, "test", "test-arn", "test-pub-userId");

    String str = p1.serialize();

    CNSMessage rec = CNSMessage.parseInstance(str);
   
    if (!p1.equals(rec)) {
      fail("Messages not equals after serialize / deserialize");
    }
View Full Code Here

TOP

Related Classes of com.comcast.cns.model.CNSMessage

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.