Class ToolTests

java.lang.Object
test.de.iip_ecosphere.platform.support.aas.basyx.ToolTests

public class ToolTests
extends Object
Tests Tools.
Author:
Holger Eichelberger, SSE
  • Constructor Details

  • Method Details

    • advanceIgnored

      private static int advanceIgnored​(int pos, String name)
      Returns an advanced pos if characters to be ignored are at pos.
      Parameters:
      pos - the current pos in name
      name - the name to check the characters for advancing for
      Returns:
      pos or advanced pos
    • equalsNormalized

      private static boolean equalsNormalized​(String name1, String name2)
      Tests for normalized name equality, i.e., lower case and '_' ignored.
      Parameters:
      name1 - the first name to be checked
      name2 - the second name to be checked
      Returns:
      true for equal, false else
    • assertEquals

      private static void assertEquals​(Enum<?> t1, Enum<?> t2)
      Asserts whether two enum constants are considered to be qqual.
      Parameters:
      t1 - the first constant
      t2 - the second constant
    • testPropertyType

      public void testPropertyType()
      Tests the property types.
    • testAssetKind

      public void testAssetKind()
      Tests the asset kinds.
    • testCheckId

      public void testCheckId()
      Tests short id checks.
    • testCheckUrn

      public void testCheckUrn()
      Tests URN checks.
    • testGetOption

      public void testGetOption()
      Tests the get option function.
    • testTranslateIdentifier

      public void testTranslateIdentifier()
      Tests the translate identifier function.
    • assertIIdentifier

      private static void assertIIdentifier​(String expectedId, org.eclipse.basyx.submodel.metamodel.api.identifier.IdentifierType expectedType, org.eclipse.basyx.submodel.metamodel.api.identifier.IIdentifier id)
      Asserts properties of an identifier.
      Parameters:
      expectedId - the expected ID
      expectedType - the expected type
      id - the id to test