Class TechnicalDataSubmodelTest
- java.lang.Object
-
- test.de.iip_ecosphere.platform.support.aas.TechnicalDataSubmodelTest
-
public abstract class TechnicalDataSubmodelTest extends java.lang.ObjectA test for the wrapped technical data submodel.- Author:
- Holger Eichelberger, SSE
-
-
Field Summary
Fields Modifier and Type Field Description private javax.xml.datatype.XMLGregorianCalendarcalprivate de.iip_ecosphere.platform.support.aas.LangStringfurtherInformationStmt1private de.iip_ecosphere.platform.support.aas.LangStringfurtherInformationStmt2private java.lang.StringmanufacturerNameprivate java.lang.StringmanufacturerOrderCodeprivate java.lang.StringmanufacturerPartNumberprivate de.iip_ecosphere.platform.support.aas.LangStringmanufacturerProductDesignation
-
Constructor Summary
Constructors Constructor Description TechnicalDataSubmodelTest()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static voidassertBuildFail(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)Asserts that the submodel cannot be built as incomplete.private static voidassertEquals(de.iip_ecosphere.platform.support.aas.LangString expected, de.iip_ecosphere.platform.support.aas.LangString actual)Asserts that twoLangStringobjects are equal.private static voidassertEquals(java.lang.String id, java.lang.String file, java.lang.String mime, de.iip_ecosphere.platform.support.aas.FileDataElement actual)Asserts that a file data element fits expected values.private static voidassertEquals(java.lang.String id, java.lang.String classSystem, java.lang.String classSystemVer, java.lang.String classId, de.iip_ecosphere.platform.support.aas.types.technicaldata.ProductClassificationItem actual)Asserts whether aProductClassificationItemhas expected information.private voidassertFurtherInformation(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)Asserts the created properties of the further information submodel.private voidassertGeneralInformation(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)Asserts the created properties of the further general information submodel.private voidassertProductClassifications(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)Asserts the created properties of the product classifications submodel.private voidassertTechnicalProperties(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)Asserts the created properties of the technical properties submodel.private voidcreateFurtherInformation(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)Creates the further information submodel elements collection.private voidcreateGeneralInformation(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)Creates the general information submodel elements collection.private voidcreateProductClassifications(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)Creates the product classifications submodel elements collection.private voidcreateTechnicalProperties(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)Creates the technical properties submodel elements collection.protected abstract java.lang.StringgetGeneralInformationManufacturerLogoId()Returns the Logo short ID of the manufacturer logo inGeneralInformation.voidtestTechnicalDataSubmodel()Tests the technical data.protected abstract java.lang.StringtoFurtherInformationStatementId(java.lang.String id)Turns a plain id into an id as used byFurtherInformation.protected abstract java.lang.StringtoGeneralInformationProductImageFileId(java.lang.String id)Turns a plain id into an id as used byGeneralInformationfor product images.protected abstract java.lang.StringtoTechnicalPropertiesMainSectionId(java.lang.String id)Turns a plain id into an id as used byTechnicalPropertiesfor main sections.protected abstract java.lang.StringtoTechnicalPropertiesSubSectionId(java.lang.String id)Turns a plain id into an id as used byTechnicalPropertiesfor sub sections.
-
-
-
Field Detail
-
cal
private javax.xml.datatype.XMLGregorianCalendar cal
-
manufacturerName
private java.lang.String manufacturerName
-
manufacturerPartNumber
private java.lang.String manufacturerPartNumber
-
manufacturerProductDesignation
private de.iip_ecosphere.platform.support.aas.LangString manufacturerProductDesignation
-
manufacturerOrderCode
private java.lang.String manufacturerOrderCode
-
furtherInformationStmt1
private de.iip_ecosphere.platform.support.aas.LangString furtherInformationStmt1
-
furtherInformationStmt2
private de.iip_ecosphere.platform.support.aas.LangString furtherInformationStmt2
-
-
Method Detail
-
toFurtherInformationStatementId
protected abstract java.lang.String toFurtherInformationStatementId(java.lang.String id)
Turns a plain id into an id as used byFurtherInformation. Although defined by standards, implementation my do that ultimately in individual manner.- Parameters:
id- the plain id- Returns:
- the transformed id
-
getGeneralInformationManufacturerLogoId
protected abstract java.lang.String getGeneralInformationManufacturerLogoId()
Returns the Logo short ID of the manufacturer logo inGeneralInformation.- Returns:
- the id
-
toGeneralInformationProductImageFileId
protected abstract java.lang.String toGeneralInformationProductImageFileId(java.lang.String id)
Turns a plain id into an id as used byGeneralInformationfor product images. Although defined by standards, implementation my do that ultimately in individual manner.- Parameters:
id- the plain id- Returns:
- the transformed id
-
toTechnicalPropertiesMainSectionId
protected abstract java.lang.String toTechnicalPropertiesMainSectionId(java.lang.String id)
Turns a plain id into an id as used byTechnicalPropertiesfor main sections. Although defined by standards, implementation my do that ultimately in individual manner.- Parameters:
id- the plain id- Returns:
- the transformed id
-
toTechnicalPropertiesSubSectionId
protected abstract java.lang.String toTechnicalPropertiesSubSectionId(java.lang.String id)
Turns a plain id into an id as used byTechnicalPropertiesfor sub sections. Although defined by standards, implementation my do that ultimately in individual manner.- Parameters:
id- the plain id- Returns:
- the transformed id
-
testTechnicalDataSubmodel
public void testTechnicalDataSubmodel() throws javax.xml.datatype.DatatypeConfigurationExceptionTests the technical data.- Throws:
javax.xml.datatype.DatatypeConfigurationException- if XML gregorian calendar is not available
-
createFurtherInformation
private void createFurtherInformation(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder) throws javax.xml.datatype.DatatypeConfigurationExceptionCreates the further information submodel elements collection.- Parameters:
tdSmBuilder- the technical data submodel builder- Throws:
javax.xml.datatype.DatatypeConfigurationException- shall not occur
-
createGeneralInformation
private void createGeneralInformation(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
Creates the general information submodel elements collection.- Parameters:
tdSmBuilder- the general information submodel builder
-
createProductClassifications
private void createProductClassifications(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
Creates the product classifications submodel elements collection.- Parameters:
tdSmBuilder- the product classifications submodel builder
-
createTechnicalProperties
private void createTechnicalProperties(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
Creates the technical properties submodel elements collection.- Parameters:
tdSmBuilder- the technical properties submodel builder
-
assertBuildFail
private static void assertBuildFail(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel.TechnicalDataSubmodelBuilder tdSmBuilder)
Asserts that the submodel cannot be built as incomplete.- Parameters:
tdSmBuilder- the technical data submodel builder
-
assertFurtherInformation
private void assertFurtherInformation(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
Asserts the created properties of the further information submodel.- Parameters:
tsub- the technical data submodel
-
assertGeneralInformation
private void assertGeneralInformation(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
Asserts the created properties of the further general information submodel.- Parameters:
tsub- the general information submodel
-
assertEquals
private static void assertEquals(de.iip_ecosphere.platform.support.aas.LangString expected, de.iip_ecosphere.platform.support.aas.LangString actual)Asserts that twoLangStringobjects are equal.- Parameters:
expected- the expected instanceactual- the actual instance
-
assertEquals
private static void assertEquals(java.lang.String id, java.lang.String file, java.lang.String mime, de.iip_ecosphere.platform.support.aas.FileDataElement actual)Asserts that a file data element fits expected values.- Parameters:
id- the id of the element, if nullactualmust be nullfile- the filemime- the mime typeactual- the actual file data element to assert
-
assertProductClassifications
private void assertProductClassifications(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
Asserts the created properties of the product classifications submodel.- Parameters:
tsub- the product classifications submodel
-
assertEquals
private static void assertEquals(java.lang.String id, java.lang.String classSystem, java.lang.String classSystemVer, java.lang.String classId, de.iip_ecosphere.platform.support.aas.types.technicaldata.ProductClassificationItem actual)Asserts whether aProductClassificationItemhas expected information.- Parameters:
id- the id of the element, if nullactualmust be nullclassSystem- the classification system nameclassSystemVer- the optional classification system version (may be null for not present)classId- the classification identifieractual- the actual classification item
-
assertTechnicalProperties
private void assertTechnicalProperties(de.iip_ecosphere.platform.support.aas.types.technicaldata.TechnicalDataSubmodel tsub)
Asserts the created properties of the technical properties submodel.- Parameters:
tsub- the technical properties submodel
-
-