RealValue : Real = DECIMAL_VALUE? '.' ( DECIMAL_VALUE | EXPONENTIAL_VALUE ) | EXPONENTIAL_VALUE
@@ -73,8 +71,6 @@ private EClassifier toEClassifier(JsonNode astJson) { type = "LiteralInteger"; } } - - // to remove when SysIDE will release a SysMLv2 2025-04 compliant version } else if ("FlowConnectionUsage".equals(type)) { type = "FlowUsage"; diff --git a/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/ContainmentReferenceHandlerTest.java b/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/ContainmentReferenceHandlerTest.java index 862dedd74..9f677413e 100644 --- a/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/ContainmentReferenceHandlerTest.java +++ b/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/ContainmentReferenceHandlerTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2025 Obeo. + * Copyright (c) 2025, 2026 Obeo. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at @@ -13,19 +13,19 @@ package org.eclipse.syson.sysml; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; import org.eclipse.syson.sysml.parser.ContainmentReferenceHandler; import org.eclipse.syson.sysml.utils.MessageReporter; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; + /** * Test class for {@link ContainmentReferenceHandler}. * @@ -45,12 +45,12 @@ public void beforeEach() { } @Test - public void checkInvalidContainementNode() throws JsonMappingException, JsonProcessingException { + public void checkInvalidContainementNode() throws DatabindException, JacksonException { assertFalse(this.refHandler.isContainmentReference(SysmlFactory.eINSTANCE.createPartDefinition(), "", this.read(""))); } @Test - public void checkInvalidTypeName() throws JsonMappingException, JsonProcessingException { + public void checkInvalidTypeName() throws DatabindException, JacksonException { assertNull(this.refHandler.handleContainmentReference(SysmlFactory.eINSTANCE.createPartDefinition(), "", this.read(""" { "$type" : "InvalidType" @@ -59,7 +59,7 @@ public void checkInvalidTypeName() throws JsonMappingException, JsonProcessingEx assertThat(this.msgReporter.getReportedMessages()).hasSize(1); } - private JsonNode read(String input) throws JsonMappingException, JsonProcessingException { + private JsonNode read(String input) throws DatabindException, JacksonException { ObjectMapper objectMapper = new ObjectMapper(); return objectMapper.readTree(input); } diff --git a/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/NonContainmentReferenceHandlerTest.java b/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/NonContainmentReferenceHandlerTest.java index 2c0644a75..b995cdf2e 100644 --- a/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/NonContainmentReferenceHandlerTest.java +++ b/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/NonContainmentReferenceHandlerTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2025 Obeo. + * Copyright (c) 2025, 2026 Obeo. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at @@ -15,16 +15,16 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertFalse; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; - import org.eclipse.syson.sysml.parser.NonContainmentReferenceHandler; import org.eclipse.syson.sysml.utils.MessageReporter; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import tools.jackson.core.JacksonException; +import tools.jackson.databind.DatabindException; +import tools.jackson.databind.JsonNode; +import tools.jackson.databind.ObjectMapper; + /** * Test class for {@link NonContainmentReferenceHandler}. * @@ -43,7 +43,7 @@ public void beforeEach() { } @Test - public void checkInvalidTypeName() throws JsonMappingException, JsonProcessingException { + public void checkInvalidTypeName() throws DatabindException, JacksonException { this.refHandler.createProxy(SysmlFactory.eINSTANCE.createPartDefinition(), "", this.read(""" { "$type" : "InvalidType" @@ -55,7 +55,7 @@ public void checkInvalidTypeName() throws JsonMappingException, JsonProcessingEx } @Test - public void checkInvalidReferenceName() throws JsonMappingException, JsonProcessingException { + public void checkInvalidReferenceName() throws DatabindException, JacksonException { this.refHandler.createProxy(SysmlFactory.eINSTANCE.createPartDefinition(), "", this.read(""" { "$type" : "PartUsage", @@ -68,7 +68,7 @@ public void checkInvalidReferenceName() throws JsonMappingException, JsonProcess } @Test - public void checkisNonContainmentReference() throws JsonMappingException, JsonProcessingException { + public void checkisNonContainmentReference() throws DatabindException, JacksonException { assertFalse(this.refHandler.isNonContainmentReference(SysmlFactory.eINSTANCE.createPartDefinition(), "", this.read(""" { "attr" : "value" @@ -76,7 +76,7 @@ public void checkisNonContainmentReference() throws JsonMappingException, JsonPr """))); } - private JsonNode read(String input) throws JsonMappingException, JsonProcessingException { + private JsonNode read(String input) throws DatabindException, JacksonException { ObjectMapper objectMapper = new ObjectMapper(); return objectMapper.readTree(input); } diff --git a/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/SysMLExternalResourceLoaderServiceTests.java b/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/SysMLExternalResourceLoaderServiceTests.java index 1fba3faa6..011ced43e 100644 --- a/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/SysMLExternalResourceLoaderServiceTests.java +++ b/backend/application/syson-sysml-import/src/test/java/org/eclipse/syson/sysml/SysMLExternalResourceLoaderServiceTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024, 2025 Obeo. + * Copyright (c) 2024, 2026 Obeo. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at @@ -12,8 +12,8 @@ *******************************************************************************/ package org.eclipse.syson.sysml; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.ByteArrayInputStream; diff --git a/backend/application/syson-sysml-validation/pom.xml b/backend/application/syson-sysml-validation/pom.xml index b378ae7c1..c8d9fcbf4 100644 --- a/backend/application/syson-sysml-validation/pom.xml +++ b/backend/application/syson-sysml-validation/pom.xml @@ -18,7 +18,7 @@