Skip to content

Commit 75a893b

Browse files
committed
Clean up test files for invalid datatypes
1 parent ec2d121 commit 75a893b

File tree

5 files changed

+28
-5
lines changed

5 files changed

+28
-5
lines changed

core/sds-aspect-model-validator/src/test/java/io/openmanufacturing/sds/aspectmodel/validation/services/AspectModelValidatorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void testValidateValidModelElement( final KnownVersion metaModelVersion )
139139
@ParameterizedTest
140140
@MethodSource( value = "versionsStartingWith2_0_0" )
141141
public void testValidateInvalidModelElement( final KnownVersion metaModelVersion ) {
142-
final VersionedModel testModel = TestResources.getModel( InvalidTestAspect.INVALID_DATATYPE, metaModelVersion ).get();
142+
final VersionedModel testModel = TestResources.getModel( InvalidTestAspect.INVALID_EXAMPLE_VALUE_DATATYPE, metaModelVersion ).get();
143143
final Resource element = testModel.getModel().createResource( TestAspect.TEST_NAMESPACE + "stringProperty" );
144144
final List<Violation> violations = service.get( metaModelVersion ).validateElement( element );
145145
assertThat( violations ).hasSize( 1 );

core/sds-test-aspect-models/src/main/java/io/openmanufacturing/sds/test/InvalidTestAspect.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public enum InvalidTestAspect implements TestModel {
2424
ASPECT_WITH_RECURSIVE_PROPERTY,
2525
INVALID_SYNTAX,
2626
MISSING_ASPECT_DECLARATION,
27-
INVALID_DATATYPE;
27+
INVALID_EXAMPLE_VALUE_DATATYPE,
28+
INVALID_PREFERRED_NAME_DATATYPE;
2829

2930
@Override
3031
public String getName() {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
@prefix unit: <urn:bamm:io.openmanufacturing:unit:1.0.0#> .
1717
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
1818

19-
:InvalidDatatype a bamm:Aspect ;
20-
bamm:name "InvalidDatatype" ;
19+
:InvalidExampleValueDatatype a bamm:Aspect ;
20+
bamm:name "InvalidExampleValueDatatype" ;
2121
bamm:properties ( :stringProperty ) ;
2222
bamm:operations ( ) .
2323

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@prefix unit: <urn:bamm:io.openmanufacturing:unit:2.0.0#> .
1717
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
1818

19-
:InvalidDatatype a bamm:Aspect ;
19+
:InvalidExampleValueDatatype a bamm:Aspect ;
2020
bamm:properties ( :stringProperty ) ;
2121
bamm:operations ( ) .
2222

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright (c) 2021 Robert Bosch Manufacturing Solutions GmbH
2+
#
3+
# See the AUTHORS file(s) distributed with this work for additional
4+
# information regarding authorship.
5+
#
6+
# This Source Code Form is subject to the terms of the Mozilla Public
7+
# License, v. 2.0. If a copy of the MPL was not distributed with this
8+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
9+
#
10+
# SPDX-License-Identifier: MPL-2.0
11+
12+
@prefix : <urn:bamm:io.openmanufacturing.test:1.0.0#> .
13+
@prefix bamm: <urn:bamm:io.openmanufacturing:meta-model:2.0.0#> .
14+
@prefix bamm-c: <urn:bamm:io.openmanufacturing:characteristic:2.0.0#> .
15+
@prefix bamm-e: <urn:bamm:io.openmanufacturing:entity:2.0.0#> .
16+
@prefix unit: <urn:bamm:io.openmanufacturing:unit:2.0.0#> .
17+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
18+
19+
:InvalidPreferredNameDatatype a bamm:Aspect ;
20+
bamm:preferredName "Invalid PreferredName Datatype" ;
21+
bamm:properties ( ) ;
22+
bamm:operations ( ) .

0 commit comments

Comments
 (0)