Esempio n. 1
0
  @Test(groups = {"functional.decode", "service.lsm"})
  public void testDecode() throws Exception {
    byte[] rawData = getEncodedData();
    AsnInputStream asn = new AsnInputStream(rawData);

    int tag = asn.readTag();
    SupportedGADShapesImpl supportedLCSCapabilityTest = new SupportedGADShapesImpl();
    supportedLCSCapabilityTest.decodeAll(asn);

    assertEquals(tag, Tag.STRING_BIT);
    assertEquals(asn.getTagClass(), Tag.CLASS_UNIVERSAL);

    assertEquals((boolean) supportedLCSCapabilityTest.getEllipsoidArc(), true);
    assertEquals((boolean) supportedLCSCapabilityTest.getEllipsoidPoint(), true);
    assertEquals((boolean) supportedLCSCapabilityTest.getEllipsoidPointWithAltitude(), true);
    assertEquals(
        (boolean) supportedLCSCapabilityTest.getEllipsoidPointWithAltitudeAndUncertaintyElipsoid(),
        true);
    assertEquals(
        (boolean) supportedLCSCapabilityTest.getEllipsoidPointWithUncertaintyCircle(), true);
    assertEquals(
        (boolean) supportedLCSCapabilityTest.getEllipsoidPointWithUncertaintyEllipse(), true);
    assertEquals((boolean) supportedLCSCapabilityTest.getPolygon(), true);
  }