test_class.declarator: XML_ENCODER = new OpenLRDatex2Encoder()
test_class.modifier: private static final
test_class.original_string: private static final OpenLRDatex2Encoder XML_ENCODER = new OpenLRDatex2Encoder();
test_class.type: OpenLRDatex2Encoder
test_class.var_name: XML_ENCODER
test_class.declarator: TEST_DATA = new File("src/test/resources/line.txt")
test_class.modifier: private static final
test_class.original_string: private static final File TEST_DATA = new File("src/test/resources/line.txt");
test_class.type: File
test_class.var_name: TEST_DATA
test_class.declarator: points
test_class.modifier: private
test_class.original_string: private List<LocationReferencePoint> points;
test_class.type: List<LocationReferencePoint>
test_class.var_name: points
test_class.declarator: off1
test_class.modifier: private
test_class.original_string: private Offsets off1;
test_class.type: Offsets
test_class.var_name: off1
test_class.declarator: off2
test_class.modifier: private
test_class.original_string: private Offsets off2;
test_class.type: Offsets
test_class.var_name: off2
test_class.file: datex2/src/test/java/openlr/datex2/OpenLRDatex2EncoderTest.java
test_class.identifier: OpenLRDatex2EncoderTest
test_case.body: @Test
      public final void testBinaryEncoder05() {
          LocationReference ref = null;
          RawLocationReference rawLocRef = new RawLineLocRef("", points, off2);
          try {
              ref = XML_ENCODER.encodeData(rawLocRef, 11);
              XmlWriter writer = new XmlWriter();
              StringWriter sw = new StringWriter();
              writer.saveDatex2Location((Datex2Location) ref.getLocationReferenceData(), sw);
              BufferedReader br = new BufferedReader(new FileReader(TEST_DATA));
              String[] lines = sw.toString().split("\n");
              int nrLines = lines.length;
              String current = null;
              for (int i = 0; i < nrLines; i++) {
                  current = br.readLine();
                  if (current == null) {
                      fail("data not complete");
                  }
                  if (!current.trim().equals(lines[i].trim())) {
                      fail("data invalid");
                  }
              }
              if (br.readLine() != null) {
                  fail("data not complete");
              }
          } catch (PhysicalFormatException e) {
              fail("cannot encode data", e);
          } catch (JAXBException e) {
              e.printStackTrace();
              fail("cannot encode data");
          } catch (SAXException e) {
              e.printStackTrace();
              fail("cannot encode data");
          } catch (FileNotFoundException e) {
              fail("", e);
          } catch (IOException e) {
              fail("", e);
          }
          if (!"datex2".equals(ref.getDataIdentifier())) {
              fail("Invalid data identifier");
          }
  
      }
test_case.class_method_signature: OpenLRDatex2EncoderTest.testBinaryEncoder05()
test_case.full_signature: @Test public final void testBinaryEncoder05()
test_case.identifier: testBinaryEncoder05
test_case.invocations: encodeData saveDatex2Location getLocationReferenceData split toString readLine fail equals trim trim fail readLine fail fail printStackTrace fail printStackTrace fail fail fail equals getDataIdentifier fail
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBinaryEncoder05()
focal_class.declarator: VERSIONS = {11}
focal_class.modifier: private static final
focal_class.original_string: private static final int[] VERSIONS = {11};
focal_class.type: int[]
focal_class.var_name: VERSIONS
focal_class.file: datex2/src/main/java/openlr/datex2/OpenLRDatex2Encoder.java
focal_class.identifier: OpenLRDatex2Encoder
focal_class.interfaces: implements PhysicalEncoder
focal_class.class_method_signature: OpenLRDatex2Encoder.checkVersion(final int ver)
focal_class.full_signature: private boolean checkVersion(final int ver)
focal_class.identifier: checkVersion
focal_class.modifiers: private
focal_class.parameters: (final int ver)
focal_class.return: boolean
focal_class.signature: boolean checkVersion(final int ver)
focal_class.class_method_signature: OpenLRDatex2Encoder.getDataClass()
focal_class.full_signature: @Override public final Class<?> getDataClass()
focal_class.identifier: getDataClass
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: Class<?>
focal_class.signature: Class<?> getDataClass()
focal_class.class_method_signature: OpenLRDatex2Encoder.getDataFormatIdentifier()
focal_class.full_signature: @Override public final String getDataFormatIdentifier()
focal_class.identifier: getDataFormatIdentifier
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getDataFormatIdentifier()
focal_class.class_method_signature: OpenLRDatex2Encoder.getSupportedVersions()
focal_class.full_signature: @Override public final int[] getSupportedVersions()
focal_class.identifier: getSupportedVersions
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: int[]
focal_class.signature: int[] getSupportedVersions()
focal_class.class_method_signature: OpenLRDatex2Encoder.encodeData(
              final RawLocationReference rawLocRef)
focal_class.full_signature: @Override public final LocationReference encodeData(
              final RawLocationReference rawLocRef)
focal_class.identifier: encodeData
focal_class.modifiers: @Override public final
focal_class.parameters: (
              final RawLocationReference rawLocRef)
focal_class.return: LocationReference
focal_class.signature: LocationReference encodeData(
              final RawLocationReference rawLocRef)
focal_class.class_method_signature: OpenLRDatex2Encoder.encodeData(
              final RawLocationReference rawLocRef, final int version)
focal_class.full_signature: @Override public final LocationReference encodeData(
              final RawLocationReference rawLocRef, final int version)
focal_class.identifier: encodeData
focal_class.modifiers: @Override public final
focal_class.parameters: (
              final RawLocationReference rawLocRef, final int version)
focal_class.return: LocationReference
focal_class.signature: LocationReference encodeData(
              final RawLocationReference rawLocRef, final int version)
focal_method.body: @Override
      public final LocationReference encodeData(
              final RawLocationReference rawLocRef) {
          return encodeData(rawLocRef, VERSIONS[VERSIONS.length - 1]);
      }
focal_method.class_method_signature: OpenLRDatex2Encoder.encodeData(
              final RawLocationReference rawLocRef)
focal_method.full_signature: @Override public final LocationReference encodeData(
              final RawLocationReference rawLocRef)
focal_method.identifier: encodeData
focal_method.invocations: encodeData
focal_method.modifiers: @Override public final
focal_method.parameters: (
              final RawLocationReference rawLocRef)
focal_method.return: LocationReference
focal_method.signature: LocationReference encodeData(
              final RawLocationReference rawLocRef)