Search in sources :

Example 11 with Submodel

use of io.adminshell.aas.v3.model.Submodel in project FAAAST-Service by FraunhoferIOSB.

the class HttpEndpointIT method testSubmodelRepositoryUpdateSubmodel.

@Test
public void testSubmodelRepositoryUpdateSubmodel() throws InterruptedException, MessageBusException, IOException, URISyntaxException, SerializationException, DeserializationException {
    Submodel expected = environment.getSubmodels().get(1);
    expected.setIdShort("changed");
    assertEvent(messageBus, ElementUpdateEventMessage.class, expected, LambdaExceptionHelper.wrap(x -> executeAndAssertSingleEntity(HttpMethod.PUT, API_PATHS.submodelRepository().submodel(expected), StatusCode.SUCCESS, expected, expected, Submodel.class)));
}
Also used : DefaultSubmodel(io.adminshell.aas.v3.model.impl.DefaultSubmodel) Submodel(io.adminshell.aas.v3.model.Submodel) HttpHelper(de.fraunhofer.iosb.ilt.faaast.service.test.util.HttpHelper) SubmodelElement(io.adminshell.aas.v3.model.SubmodelElement) ElementReadEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.access.ElementReadEventMessage) HttpHelper.toHttpStatusCode(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.util.HttpHelper.toHttpStatusCode) ConceptDescription(io.adminshell.aas.v3.model.ConceptDescription) URISyntaxException(java.net.URISyntaxException) OutputModifier(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier) Service(de.fraunhofer.iosb.ilt.faaast.service.Service) SubmodelElementCollection(io.adminshell.aas.v3.model.SubmodelElementCollection) DefaultIdentifier(io.adminshell.aas.v3.model.impl.DefaultIdentifier) DefaultProperty(io.adminshell.aas.v3.model.impl.DefaultProperty) MessageBusInternalConfig(de.fraunhofer.iosb.ilt.faaast.service.messagebus.internal.MessageBusInternalConfig) ServerSocket(java.net.ServerSocket) StatusCode(de.fraunhofer.iosb.ilt.faaast.service.model.api.StatusCode) DeserializationException(de.fraunhofer.iosb.ilt.faaast.service.dataformat.DeserializationException) DefaultIdentifierKeyValuePair(io.adminshell.aas.v3.model.impl.DefaultIdentifierKeyValuePair) Map(java.util.Map) After(org.junit.After) FaaastConstants(de.fraunhofer.iosb.ilt.faaast.service.util.FaaastConstants) DefaultConceptDescription(io.adminshell.aas.v3.model.impl.DefaultConceptDescription) DefaultKey(io.adminshell.aas.v3.model.impl.DefaultKey) Level(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.Level) HttpResponse(java.net.http.HttpResponse) IdentifierType(io.adminshell.aas.v3.model.IdentifierType) MessageBusHelper.assertEvent(de.fraunhofer.iosb.ilt.faaast.service.test.util.MessageBusHelper.assertEvent) EncodingHelper(de.fraunhofer.iosb.ilt.faaast.service.util.EncodingHelper) ApiPaths(de.fraunhofer.iosb.ilt.faaast.service.test.util.ApiPaths) Reference(io.adminshell.aas.v3.model.Reference) ElementCreateEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementCreateEventMessage) SerializationException(de.fraunhofer.iosb.ilt.faaast.service.dataformat.SerializationException) Collectors(java.util.stream.Collectors) IdentifierKeyValuePair(io.adminshell.aas.v3.model.IdentifierKeyValuePair) EventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.EventMessage) List(java.util.List) CoreConfig(de.fraunhofer.iosb.ilt.faaast.service.config.CoreConfig) Path(de.fraunhofer.iosb.ilt.faaast.service.serialization.json.util.Path) BeforeClass(org.junit.BeforeClass) AASFull(de.fraunhofer.iosb.ilt.faaast.service.model.AASFull) AssetAdministrationShellEnvironment(io.adminshell.aas.v3.model.AssetAdministrationShellEnvironment) JSONAssert(org.skyscreamer.jsonassert.JSONAssert) ServiceConfig(de.fraunhofer.iosb.ilt.faaast.service.config.ServiceConfig) AssetInformation(io.adminshell.aas.v3.model.AssetInformation) Identifier(io.adminshell.aas.v3.model.Identifier) ArrayList(java.util.ArrayList) DeepCopyHelper(de.fraunhofer.iosb.ilt.faaast.service.util.DeepCopyHelper) KeyType(io.adminshell.aas.v3.model.KeyType) LangString(io.adminshell.aas.v3.model.LangString) DefaultAssetAdministrationShell(io.adminshell.aas.v3.model.impl.DefaultAssetAdministrationShell) ElementDeleteEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementDeleteEventMessage) Before(org.junit.Before) MessageBus(de.fraunhofer.iosb.ilt.faaast.service.messagebus.MessageBus) HttpMethod(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpMethod) MessageBusException(de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException) DefaultSubmodel(io.adminshell.aas.v3.model.impl.DefaultSubmodel) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) HttpEndpointConfig(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.HttpEndpointConfig) IOException(java.io.IOException) Test(org.junit.Test) JsonSerializer(de.fraunhofer.iosb.ilt.faaast.service.dataformat.json.JsonSerializer) PersistenceInMemoryConfig(de.fraunhofer.iosb.ilt.faaast.service.persistence.memory.PersistenceInMemoryConfig) DefaultReference(io.adminshell.aas.v3.model.impl.DefaultReference) LambdaExceptionHelper(de.fraunhofer.iosb.ilt.faaast.service.util.LambdaExceptionHelper) ElementUpdateEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementUpdateEventMessage) AssetAdministrationShell(io.adminshell.aas.v3.model.AssetAdministrationShell) Assert(org.junit.Assert) Content(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.Content) Submodel(io.adminshell.aas.v3.model.Submodel) Test(org.junit.Test)

Example 12 with Submodel

use of io.adminshell.aas.v3.model.Submodel in project FAAAST-Service by FraunhoferIOSB.

the class HttpEndpointIT method testSubmodelRepositoryGetSubmodelsByIdShort.

@Test
public void testSubmodelRepositoryGetSubmodelsByIdShort() throws IOException, DeserializationException, InterruptedException, URISyntaxException, SerializationException {
    Submodel expected = environment.getSubmodels().get(1);
    executeAndAssertMultipleEntities(HttpMethod.GET, String.format("%s?idShort=%s", API_PATHS.submodelRepository().submodels(), expected.getIdShort()), StatusCode.SUCCESS, null, List.of(expected), Submodel.class);
}
Also used : DefaultSubmodel(io.adminshell.aas.v3.model.impl.DefaultSubmodel) Submodel(io.adminshell.aas.v3.model.Submodel) Test(org.junit.Test)

Example 13 with Submodel

use of io.adminshell.aas.v3.model.Submodel in project FAAAST-Service by FraunhoferIOSB.

the class HttpEndpointIT method testSubmodelInterfaceGetSubmodelLevelDeep.

@Test
public void testSubmodelInterfaceGetSubmodelLevelDeep() throws IOException, DeserializationException, InterruptedException, URISyntaxException, SerializationException, MessageBusException {
    Submodel expected = environment.getSubmodels().get(2);
    assertEvent(messageBus, ElementReadEventMessage.class, expected, LambdaExceptionHelper.wrap(x -> executeAndAssertSingleEntity(HttpMethod.GET, API_PATHS.submodelRepository().submodelInterface(expected).submodel(Level.DEEP), StatusCode.SUCCESS, null, expected, Submodel.class)));
}
Also used : DefaultSubmodel(io.adminshell.aas.v3.model.impl.DefaultSubmodel) Submodel(io.adminshell.aas.v3.model.Submodel) HttpHelper(de.fraunhofer.iosb.ilt.faaast.service.test.util.HttpHelper) SubmodelElement(io.adminshell.aas.v3.model.SubmodelElement) ElementReadEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.access.ElementReadEventMessage) HttpHelper.toHttpStatusCode(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.util.HttpHelper.toHttpStatusCode) ConceptDescription(io.adminshell.aas.v3.model.ConceptDescription) URISyntaxException(java.net.URISyntaxException) OutputModifier(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier) Service(de.fraunhofer.iosb.ilt.faaast.service.Service) SubmodelElementCollection(io.adminshell.aas.v3.model.SubmodelElementCollection) DefaultIdentifier(io.adminshell.aas.v3.model.impl.DefaultIdentifier) DefaultProperty(io.adminshell.aas.v3.model.impl.DefaultProperty) MessageBusInternalConfig(de.fraunhofer.iosb.ilt.faaast.service.messagebus.internal.MessageBusInternalConfig) ServerSocket(java.net.ServerSocket) StatusCode(de.fraunhofer.iosb.ilt.faaast.service.model.api.StatusCode) DeserializationException(de.fraunhofer.iosb.ilt.faaast.service.dataformat.DeserializationException) DefaultIdentifierKeyValuePair(io.adminshell.aas.v3.model.impl.DefaultIdentifierKeyValuePair) Map(java.util.Map) After(org.junit.After) FaaastConstants(de.fraunhofer.iosb.ilt.faaast.service.util.FaaastConstants) DefaultConceptDescription(io.adminshell.aas.v3.model.impl.DefaultConceptDescription) DefaultKey(io.adminshell.aas.v3.model.impl.DefaultKey) Level(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.Level) HttpResponse(java.net.http.HttpResponse) IdentifierType(io.adminshell.aas.v3.model.IdentifierType) MessageBusHelper.assertEvent(de.fraunhofer.iosb.ilt.faaast.service.test.util.MessageBusHelper.assertEvent) EncodingHelper(de.fraunhofer.iosb.ilt.faaast.service.util.EncodingHelper) ApiPaths(de.fraunhofer.iosb.ilt.faaast.service.test.util.ApiPaths) Reference(io.adminshell.aas.v3.model.Reference) ElementCreateEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementCreateEventMessage) SerializationException(de.fraunhofer.iosb.ilt.faaast.service.dataformat.SerializationException) Collectors(java.util.stream.Collectors) IdentifierKeyValuePair(io.adminshell.aas.v3.model.IdentifierKeyValuePair) EventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.EventMessage) List(java.util.List) CoreConfig(de.fraunhofer.iosb.ilt.faaast.service.config.CoreConfig) Path(de.fraunhofer.iosb.ilt.faaast.service.serialization.json.util.Path) BeforeClass(org.junit.BeforeClass) AASFull(de.fraunhofer.iosb.ilt.faaast.service.model.AASFull) AssetAdministrationShellEnvironment(io.adminshell.aas.v3.model.AssetAdministrationShellEnvironment) JSONAssert(org.skyscreamer.jsonassert.JSONAssert) ServiceConfig(de.fraunhofer.iosb.ilt.faaast.service.config.ServiceConfig) AssetInformation(io.adminshell.aas.v3.model.AssetInformation) Identifier(io.adminshell.aas.v3.model.Identifier) ArrayList(java.util.ArrayList) DeepCopyHelper(de.fraunhofer.iosb.ilt.faaast.service.util.DeepCopyHelper) KeyType(io.adminshell.aas.v3.model.KeyType) LangString(io.adminshell.aas.v3.model.LangString) DefaultAssetAdministrationShell(io.adminshell.aas.v3.model.impl.DefaultAssetAdministrationShell) ElementDeleteEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementDeleteEventMessage) Before(org.junit.Before) MessageBus(de.fraunhofer.iosb.ilt.faaast.service.messagebus.MessageBus) HttpMethod(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpMethod) MessageBusException(de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException) DefaultSubmodel(io.adminshell.aas.v3.model.impl.DefaultSubmodel) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) HttpEndpointConfig(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.HttpEndpointConfig) IOException(java.io.IOException) Test(org.junit.Test) JsonSerializer(de.fraunhofer.iosb.ilt.faaast.service.dataformat.json.JsonSerializer) PersistenceInMemoryConfig(de.fraunhofer.iosb.ilt.faaast.service.persistence.memory.PersistenceInMemoryConfig) DefaultReference(io.adminshell.aas.v3.model.impl.DefaultReference) LambdaExceptionHelper(de.fraunhofer.iosb.ilt.faaast.service.util.LambdaExceptionHelper) ElementUpdateEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementUpdateEventMessage) AssetAdministrationShell(io.adminshell.aas.v3.model.AssetAdministrationShell) Assert(org.junit.Assert) Content(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.Content) Submodel(io.adminshell.aas.v3.model.Submodel) Test(org.junit.Test)

Example 14 with Submodel

use of io.adminshell.aas.v3.model.Submodel in project FAAAST-Service by FraunhoferIOSB.

the class HttpEndpointIT method testSubmodelInterfaceGetSubmodelContentPath.

@Test
public void testSubmodelInterfaceGetSubmodelContentPath() throws IOException, DeserializationException, InterruptedException, URISyntaxException, SerializationException, MessageBusException {
    Submodel submodel = environment.getSubmodels().get(2);
    Path expected = Path.builder().id("TestSubmodel3").child("ExampleRelationshipElement").child("ExampleAnnotatedRelationshipElement").child("ExampleOperation").child("ExampleCapability").child("ExampleBasicEvent").child(Path.builder().id("ExampleSubmodelCollectionOrdered").child("ExampleProperty").child("ExampleMultiLanguageProperty").child("ExampleRange").build()).child(Path.builder().id("ExampleSubmodelCollectionUnordered").child("ExampleBlob").child("ExampleFile").child("ExampleReferenceElement").build()).build();
    assertEvent(messageBus, ElementReadEventMessage.class, submodel, LambdaExceptionHelper.wrap(x -> {
        HttpResponse<String> response = HttpHelper.get(API_PATHS.submodelRepository().submodelInterface(submodel).submodel(Level.DEEP, Content.PATH));
        Assert.assertEquals(toHttpStatusCode(StatusCode.SUCCESS), response.statusCode());
        JSONAssert.assertEquals(mapper.writeValueAsString(expected.getPaths()), response.body(), false);
    }));
}
Also used : DefaultSubmodel(io.adminshell.aas.v3.model.impl.DefaultSubmodel) Submodel(io.adminshell.aas.v3.model.Submodel) Path(de.fraunhofer.iosb.ilt.faaast.service.serialization.json.util.Path) HttpHelper(de.fraunhofer.iosb.ilt.faaast.service.test.util.HttpHelper) SubmodelElement(io.adminshell.aas.v3.model.SubmodelElement) ElementReadEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.access.ElementReadEventMessage) HttpHelper.toHttpStatusCode(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.util.HttpHelper.toHttpStatusCode) ConceptDescription(io.adminshell.aas.v3.model.ConceptDescription) URISyntaxException(java.net.URISyntaxException) OutputModifier(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier) Service(de.fraunhofer.iosb.ilt.faaast.service.Service) SubmodelElementCollection(io.adminshell.aas.v3.model.SubmodelElementCollection) DefaultIdentifier(io.adminshell.aas.v3.model.impl.DefaultIdentifier) DefaultProperty(io.adminshell.aas.v3.model.impl.DefaultProperty) MessageBusInternalConfig(de.fraunhofer.iosb.ilt.faaast.service.messagebus.internal.MessageBusInternalConfig) ServerSocket(java.net.ServerSocket) StatusCode(de.fraunhofer.iosb.ilt.faaast.service.model.api.StatusCode) DeserializationException(de.fraunhofer.iosb.ilt.faaast.service.dataformat.DeserializationException) DefaultIdentifierKeyValuePair(io.adminshell.aas.v3.model.impl.DefaultIdentifierKeyValuePair) Map(java.util.Map) After(org.junit.After) FaaastConstants(de.fraunhofer.iosb.ilt.faaast.service.util.FaaastConstants) DefaultConceptDescription(io.adminshell.aas.v3.model.impl.DefaultConceptDescription) DefaultKey(io.adminshell.aas.v3.model.impl.DefaultKey) Level(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.Level) HttpResponse(java.net.http.HttpResponse) IdentifierType(io.adminshell.aas.v3.model.IdentifierType) MessageBusHelper.assertEvent(de.fraunhofer.iosb.ilt.faaast.service.test.util.MessageBusHelper.assertEvent) EncodingHelper(de.fraunhofer.iosb.ilt.faaast.service.util.EncodingHelper) ApiPaths(de.fraunhofer.iosb.ilt.faaast.service.test.util.ApiPaths) Reference(io.adminshell.aas.v3.model.Reference) ElementCreateEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementCreateEventMessage) SerializationException(de.fraunhofer.iosb.ilt.faaast.service.dataformat.SerializationException) Collectors(java.util.stream.Collectors) IdentifierKeyValuePair(io.adminshell.aas.v3.model.IdentifierKeyValuePair) EventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.EventMessage) List(java.util.List) CoreConfig(de.fraunhofer.iosb.ilt.faaast.service.config.CoreConfig) Path(de.fraunhofer.iosb.ilt.faaast.service.serialization.json.util.Path) BeforeClass(org.junit.BeforeClass) AASFull(de.fraunhofer.iosb.ilt.faaast.service.model.AASFull) AssetAdministrationShellEnvironment(io.adminshell.aas.v3.model.AssetAdministrationShellEnvironment) JSONAssert(org.skyscreamer.jsonassert.JSONAssert) ServiceConfig(de.fraunhofer.iosb.ilt.faaast.service.config.ServiceConfig) AssetInformation(io.adminshell.aas.v3.model.AssetInformation) Identifier(io.adminshell.aas.v3.model.Identifier) ArrayList(java.util.ArrayList) DeepCopyHelper(de.fraunhofer.iosb.ilt.faaast.service.util.DeepCopyHelper) KeyType(io.adminshell.aas.v3.model.KeyType) LangString(io.adminshell.aas.v3.model.LangString) DefaultAssetAdministrationShell(io.adminshell.aas.v3.model.impl.DefaultAssetAdministrationShell) ElementDeleteEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementDeleteEventMessage) Before(org.junit.Before) MessageBus(de.fraunhofer.iosb.ilt.faaast.service.messagebus.MessageBus) HttpMethod(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpMethod) MessageBusException(de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException) DefaultSubmodel(io.adminshell.aas.v3.model.impl.DefaultSubmodel) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) HttpEndpointConfig(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.HttpEndpointConfig) IOException(java.io.IOException) Test(org.junit.Test) JsonSerializer(de.fraunhofer.iosb.ilt.faaast.service.dataformat.json.JsonSerializer) PersistenceInMemoryConfig(de.fraunhofer.iosb.ilt.faaast.service.persistence.memory.PersistenceInMemoryConfig) DefaultReference(io.adminshell.aas.v3.model.impl.DefaultReference) LambdaExceptionHelper(de.fraunhofer.iosb.ilt.faaast.service.util.LambdaExceptionHelper) ElementUpdateEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementUpdateEventMessage) AssetAdministrationShell(io.adminshell.aas.v3.model.AssetAdministrationShell) Assert(org.junit.Assert) Content(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.Content) Submodel(io.adminshell.aas.v3.model.Submodel) HttpResponse(java.net.http.HttpResponse) Test(org.junit.Test)

Example 15 with Submodel

use of io.adminshell.aas.v3.model.Submodel in project FAAAST-Service by FraunhoferIOSB.

the class HttpEndpointIT method testSubmodelInterfaceGetSubmodel_ContentValue.

@Test
public void testSubmodelInterfaceGetSubmodel_ContentValue() throws IOException, DeserializationException, InterruptedException, URISyntaxException, SerializationException, MessageBusException {
    Submodel submodel = environment.getSubmodels().get(3);
    String expected = new JsonSerializer().write(submodel, new OutputModifier.Builder().content(Content.VALUE).build());
    assertEvent(messageBus, ElementReadEventMessage.class, submodel, LambdaExceptionHelper.wrap(x -> {
        HttpResponse<String> response = HttpHelper.get(API_PATHS.submodelRepository().submodelInterface(submodel).submodel(Content.VALUE));
        Assert.assertEquals(toHttpStatusCode(StatusCode.SUCCESS), response.statusCode());
        JSONAssert.assertEquals(expected, response.body(), false);
    }));
}
Also used : DefaultSubmodel(io.adminshell.aas.v3.model.impl.DefaultSubmodel) Submodel(io.adminshell.aas.v3.model.Submodel) HttpHelper(de.fraunhofer.iosb.ilt.faaast.service.test.util.HttpHelper) SubmodelElement(io.adminshell.aas.v3.model.SubmodelElement) ElementReadEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.access.ElementReadEventMessage) HttpHelper.toHttpStatusCode(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.util.HttpHelper.toHttpStatusCode) ConceptDescription(io.adminshell.aas.v3.model.ConceptDescription) URISyntaxException(java.net.URISyntaxException) OutputModifier(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier) Service(de.fraunhofer.iosb.ilt.faaast.service.Service) SubmodelElementCollection(io.adminshell.aas.v3.model.SubmodelElementCollection) DefaultIdentifier(io.adminshell.aas.v3.model.impl.DefaultIdentifier) DefaultProperty(io.adminshell.aas.v3.model.impl.DefaultProperty) MessageBusInternalConfig(de.fraunhofer.iosb.ilt.faaast.service.messagebus.internal.MessageBusInternalConfig) ServerSocket(java.net.ServerSocket) StatusCode(de.fraunhofer.iosb.ilt.faaast.service.model.api.StatusCode) DeserializationException(de.fraunhofer.iosb.ilt.faaast.service.dataformat.DeserializationException) DefaultIdentifierKeyValuePair(io.adminshell.aas.v3.model.impl.DefaultIdentifierKeyValuePair) Map(java.util.Map) After(org.junit.After) FaaastConstants(de.fraunhofer.iosb.ilt.faaast.service.util.FaaastConstants) DefaultConceptDescription(io.adminshell.aas.v3.model.impl.DefaultConceptDescription) DefaultKey(io.adminshell.aas.v3.model.impl.DefaultKey) Level(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.Level) HttpResponse(java.net.http.HttpResponse) IdentifierType(io.adminshell.aas.v3.model.IdentifierType) MessageBusHelper.assertEvent(de.fraunhofer.iosb.ilt.faaast.service.test.util.MessageBusHelper.assertEvent) EncodingHelper(de.fraunhofer.iosb.ilt.faaast.service.util.EncodingHelper) ApiPaths(de.fraunhofer.iosb.ilt.faaast.service.test.util.ApiPaths) Reference(io.adminshell.aas.v3.model.Reference) ElementCreateEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementCreateEventMessage) SerializationException(de.fraunhofer.iosb.ilt.faaast.service.dataformat.SerializationException) Collectors(java.util.stream.Collectors) IdentifierKeyValuePair(io.adminshell.aas.v3.model.IdentifierKeyValuePair) EventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.EventMessage) List(java.util.List) CoreConfig(de.fraunhofer.iosb.ilt.faaast.service.config.CoreConfig) Path(de.fraunhofer.iosb.ilt.faaast.service.serialization.json.util.Path) BeforeClass(org.junit.BeforeClass) AASFull(de.fraunhofer.iosb.ilt.faaast.service.model.AASFull) AssetAdministrationShellEnvironment(io.adminshell.aas.v3.model.AssetAdministrationShellEnvironment) JSONAssert(org.skyscreamer.jsonassert.JSONAssert) ServiceConfig(de.fraunhofer.iosb.ilt.faaast.service.config.ServiceConfig) AssetInformation(io.adminshell.aas.v3.model.AssetInformation) Identifier(io.adminshell.aas.v3.model.Identifier) ArrayList(java.util.ArrayList) DeepCopyHelper(de.fraunhofer.iosb.ilt.faaast.service.util.DeepCopyHelper) KeyType(io.adminshell.aas.v3.model.KeyType) LangString(io.adminshell.aas.v3.model.LangString) DefaultAssetAdministrationShell(io.adminshell.aas.v3.model.impl.DefaultAssetAdministrationShell) ElementDeleteEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementDeleteEventMessage) Before(org.junit.Before) MessageBus(de.fraunhofer.iosb.ilt.faaast.service.messagebus.MessageBus) HttpMethod(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpMethod) MessageBusException(de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException) DefaultSubmodel(io.adminshell.aas.v3.model.impl.DefaultSubmodel) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) HttpEndpointConfig(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.HttpEndpointConfig) IOException(java.io.IOException) Test(org.junit.Test) JsonSerializer(de.fraunhofer.iosb.ilt.faaast.service.dataformat.json.JsonSerializer) PersistenceInMemoryConfig(de.fraunhofer.iosb.ilt.faaast.service.persistence.memory.PersistenceInMemoryConfig) DefaultReference(io.adminshell.aas.v3.model.impl.DefaultReference) LambdaExceptionHelper(de.fraunhofer.iosb.ilt.faaast.service.util.LambdaExceptionHelper) ElementUpdateEventMessage(de.fraunhofer.iosb.ilt.faaast.service.model.messagebus.event.change.ElementUpdateEventMessage) AssetAdministrationShell(io.adminshell.aas.v3.model.AssetAdministrationShell) Assert(org.junit.Assert) Content(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.Content) Submodel(io.adminshell.aas.v3.model.Submodel) OutputModifier(de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier) HttpResponse(java.net.http.HttpResponse) LangString(io.adminshell.aas.v3.model.LangString) JsonSerializer(de.fraunhofer.iosb.ilt.faaast.service.dataformat.json.JsonSerializer) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)60 Submodel (io.adminshell.aas.v3.model.Submodel)58 Reference (io.adminshell.aas.v3.model.Reference)53 DefaultReference (io.adminshell.aas.v3.model.impl.DefaultReference)49 LangString (io.adminshell.aas.v3.model.LangString)47 SubmodelElement (io.adminshell.aas.v3.model.SubmodelElement)41 MessageBusException (de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException)38 DefaultSubmodel (io.adminshell.aas.v3.model.impl.DefaultSubmodel)34 DefaultKey (io.adminshell.aas.v3.model.impl.DefaultKey)30 ArrayList (java.util.ArrayList)30 DefaultIdentifier (io.adminshell.aas.v3.model.impl.DefaultIdentifier)28 Identifier (io.adminshell.aas.v3.model.Identifier)27 SubmodelElementCollection (io.adminshell.aas.v3.model.SubmodelElementCollection)25 OutputModifier (de.fraunhofer.iosb.ilt.faaast.service.model.api.modifier.OutputModifier)24 List (java.util.List)24 Collectors (java.util.stream.Collectors)24 StatusException (com.prosysopc.ua.StatusException)23 DeepCopyHelper (de.fraunhofer.iosb.ilt.faaast.service.util.DeepCopyHelper)23 AssetAdministrationShell (io.adminshell.aas.v3.model.AssetAdministrationShell)22 ConceptDescription (io.adminshell.aas.v3.model.ConceptDescription)22