Skip to content

Commit

Permalink
fix serializer test, add thumbnail to AASFull
Browse files Browse the repository at this point in the history
  • Loading branch information
fvolz committed Feb 23, 2024
1 parent 6031187 commit 7f117f4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ public class AASXSerializerTest {
public void setup() throws IOException {
byte[] operationManualContent = { 0, 1, 2, 3, 4 };
byte[] thumbnail = { 0, 1, 2, 3, 4 };
InMemoryFile file = new InMemoryFile(operationManualContent, "file:///aasx/OperatingManual.pdf");
InMemoryFile file = new InMemoryFile(operationManualContent, "file:///TestFile.pdf");
InMemoryFile file2 = new InMemoryFile(operationManualContent, "file:///TestFile2.pdf");
InMemoryFile inMemoryFileThumbnail = new InMemoryFile(thumbnail, "file:///master/verwaltungsschale-detail-part1.png");
fileList.add(file);
fileList.add(file2);
fileList.add(inMemoryFileThumbnail);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public class AASFull {
public final static ConceptDescription CONCEPT_DESCRIPTION_4 = createConceptDescription4();
public static final Environment ENVIRONMENT = createEnvironment();
public static final String AAS_3_0_RC_02_DATA_SPECIFICATION_IEC_61360 = "https://admin-shell.io/aas/3/0/RC02/DataSpecificationIec61360";
private static final String FILE_MASTER_VERWALTUNGSSCHALE_DETAIL_PART1_PNG = "file:///master/verwaltungsschale-detail-part1.png";
private static final String IMAGE_PNG = "image/png";

public static AssetAdministrationShell createAAS1() {
return new DefaultAssetAdministrationShell.Builder()
Expand Down Expand Up @@ -116,6 +118,10 @@ public static AssetAdministrationShell createAAS1() {
// .value("http://acplt.org/Submodels/Assets/TestAsset/BillOfMaterial")
// .build()))
// .build())
.defaultThumbnail(new DefaultResource.Builder()
.contentType(IMAGE_PNG)
.path(FILE_MASTER_VERWALTUNGSSCHALE_DETAIL_PART1_PNG)
.build())
.build())
.submodels(new DefaultReference.Builder()
.keys(new DefaultKey.Builder()
Expand Down Expand Up @@ -1326,7 +1332,7 @@ public static Submodel createSubmodel6() {
.build())
.type(ReferenceTypes.EXTERNAL_REFERENCE)
.build())
.value("file:///TestFile.pdf")
.value("file:///TestFile2.pdf")
.contentType("application/pdf")
.build())
.value(new DefaultReferenceElement.Builder()
Expand Down

0 comments on commit 7f117f4

Please sign in to comment.