Exemple #1
0
  @Test
  public void testBER2() throws Exception {
    ByteProvider byteProvider = new ByteArrayDataProvider(KLVPacketTest.KberL2);

    KLVPacket.Header header = new KLVPacket.Header(byteProvider, 0L);

    assertEquals(header.getLSize(), 1);
    assertEquals(header.getKLSize(), 17);
    assertEquals(header.getVSize(), 0);
  }
Exemple #2
0
  @Test
  public void testBER9() throws Exception {
    ByteProvider byteProvider = new ByteArrayDataProvider(KLVPacketTest.KberL9);

    KLVPacket.Header header = new KLVPacket.Header(byteProvider, 0L);

    assertEquals(header.getLSize(), 1);
    assertEquals(header.getKLSize(), 17);
    assertEquals(header.getVSize(), 0);
    assertFalse(KLVPacket.isKLVFillItem(header.getKey()));
  }
Exemple #3
0
  @Test
  public void testBER1() throws Exception {
    ByteProvider byteProvider = new ByteArrayDataProvider(KLVPacketTest.KberL1);

    KLVPacket.Header header = new KLVPacket.Header(byteProvider, 0L);

    assertEquals(header.getLSize(), 1);
    assertEquals(header.getKLSize(), 17);
    assertEquals(header.getVSize(), 127);
    assertTrue(header.categoryDesignatorIsDictionaries());
    assertFalse(header.categoryDesignatorIsGroups());
    assertFalse(header.categoryDesignatorIsWrappersAndContainers());
    assertFalse(header.categoryDesignatorIsLabels());
    assertTrue(KLVPacket.isKLVFillItem(header.getKey()));
    assertTrue(header.toString().length() > 0);
  }