test/net/java/sip/communicator/slick/protocol/icq/TestOperationSetBasicInstantMessaging.java
/**
     * Creates an Message through the simple createMessage() method and inspects
     * its parameters.
     */
Creates an Message through the simple createMessage() method and inspects
its parameters.
Creates an Message through the simple createMessage () method and inspects its parameters .
public void testCreateMessage1()
    {
        String body = "This is an IM coming from the tested implementation"
            + " on " + new Date().toString();
        net.java.sip.communicator.service.protocol.Message msg
            = opSetBasicIM.createMessage(body);
        assertEquals("message body", body, msg.getContent());
        assertTrue("message body bytes"
                   , Arrays.equals(body.getBytes(), msg.getRawData()));
        assertEquals("message length", body.length(), msg.getSize());
        assertEquals("message content type"
                     , OperationSetBasicInstantMessaging.DEFAULT_MIME_TYPE
                     , msg.getContentType());
        assertEquals("message encoding"
                     , OperationSetBasicInstantMessaging.DEFAULT_MIME_ENCODING
                     , msg.getEncoding());
        assertNotNull("message uid", msg.getMessageUID());
        net.java.sip.communicator.service.protocol.Message msg2
            = opSetBasicIM.createMessage(body);
        assertFalse("message uid", msg.getMessageUID().equals(
                                                        msg2.getMessageUID()));
    }
public void testCreateMessage1 ( ) { String body = "This is an IM coming from the tested implementation" + " on " + new Date ( ) . toString ( ) ; net . java . sip . communicator . service . protocol . Message msg = opSetBasicIM . createMessage ( body ) ; assertEquals ( "message body" , body , msg . getContent ( ) ) ; assertTrue ( "message body bytes" , Arrays . equals ( body . getBytes ( ) , msg . getRawData ( ) ) ) ; assertEquals ( "message length" , body . length ( ) , msg . getSize ( ) ) ; assertEquals ( "message content type" , OperationSetBasicInstantMessaging . DEFAULT_MIME_TYPE , msg . getContentType ( ) ) ; assertEquals ( "message encoding" , OperationSetBasicInstantMessaging . DEFAULT_MIME_ENCODING , msg . getEncoding ( ) ) ; assertNotNull ( "message uid" , msg . getMessageUID ( ) ) ; net . java . sip . communicator . service . protocol . Message msg2 = opSetBasicIM . createMessage ( body ) ; assertFalse ( "message uid" , msg . getMessageUID ( ) . equals ( msg2 . getMessageUID ( ) ) ) ; }
Creates an Message through the simple createMessage() method and inspects
 its parameters.
Creates an Message through the simple createMessage () method and inspects its parameters .
//a further test on message uid.