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 Summary
Constructors Constructor Description ToolTests() -
Method Summary
Modifier and Type Method Description private static intadvanceIgnored(int pos, String name)Returns an advancedposif characters to be ignored are atpos.private static voidassertEquals(Enum<?> t1, Enum<?> t2)Asserts whether two enum constants are considered to be qqual.private static voidassertIIdentifier(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.private static booleanequalsNormalized(String name1, String name2)Tests for normalized name equality, i.e., lower case and '_' ignored.voidtestAssetKind()Tests the asset kinds.voidtestCheckId()Tests short id checks.voidtestCheckUrn()Tests URN checks.voidtestGetOption()Tests the get option function.voidtestPropertyType()Tests the property types.voidtestTranslateIdentifier()Tests the translate identifier function.
-
Constructor Details
-
ToolTests
public ToolTests()
-
-
Method Details
-
advanceIgnored
Returns an advancedposif characters to be ignored are atpos.- Parameters:
pos- the current pos innamename- the name to check the characters for advancing for- Returns:
posor advancedpos
-
equalsNormalized
Tests for normalized name equality, i.e., lower case and '_' ignored.- Parameters:
name1- the first name to be checkedname2- the second name to be checked- Returns:
truefor equal,falseelse
-
assertEquals
Asserts whether two enum constants are considered to be qqual.- Parameters:
t1- the first constantt2- 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 IDexpectedType- the expected typeid- the id to test
-