Ejemplo n.º 1
0
  @Test
  public void testComplete() {

    dummyAttachment.setAttachmentIdentifier("Att_ID");
    dummyAttachment.setAttachmentFileName("FILE_NM");
    dummyAttachment.setAttachmentFileSize(new Long(12345));
    dummyAttachment.setAttachmentMimeTypeCode("MIME_TYP");
    assertTrue("Testing Complete of Attachment in AttachmentTest", dummyAttachment.isComplete());
    {
      dummyAttachment.setAttachmentFileName(null);
      assertFalse("Testing Complete of Attachment in AttachmentTest", dummyAttachment.isComplete());
    }
    {
      dummyAttachment.setAttachmentFileSize((long) 0);
      assertFalse("Testing Complete of Attachment in AttachmentTest", dummyAttachment.isComplete());
    }
    {
      dummyAttachment.setAttachmentIdentifier(null);
      assertFalse("Testing Complete of Attachment in AttachmentTest", dummyAttachment.isComplete());
    }
    {
      dummyAttachment.setAttachmentMimeTypeCode(null);
      assertFalse("Testing Complete of Attachment in AttachmentTest", dummyAttachment.isComplete());
    }
  }
Ejemplo n.º 2
0
 @Test
 public void testAttachmentFileSize() {
   dummyAttachment.setAttachmentFileSize((long) 12345);
   assertTrue(
       "Testing AttachmentFileSize of Attachment in AttachmentTest",
       12345 == dummyAttachment.getAttachmentFileSize());
 }