|
2 | 2 | * Copyright (c) 2021 Robert Bosch Manufacturing Solutions GmbH
|
3 | 3 | *
|
4 | 4 | * See the AUTHORS file(s) distributed with this work for additional
|
5 |
| - * information regarding authorship. |
| 5 | + * information regarding authorship. |
6 | 6 | *
|
7 | 7 | * This Source Code Form is subject to the terms of the Mozilla Public
|
8 | 8 | * License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
18 | 18 | import java.net.URL;
|
19 | 19 | import java.util.Optional;
|
20 | 20 |
|
21 |
| -import io.openmanufacturing.sds.aspectmetamodel.KnownVersion; |
22 |
| - |
23 | 21 | import org.junit.jupiter.api.Test;
|
| 22 | +import org.junit.jupiter.params.ParameterizedTest; |
| 23 | +import org.junit.jupiter.params.provider.MethodSource; |
| 24 | + |
| 25 | +import io.openmanufacturing.sds.aspectmetamodel.KnownVersion; |
| 26 | +import io.openmanufacturing.sds.test.MetaModelVersions; |
24 | 27 |
|
25 |
| -public class ClassPathMetaModelUrnResolverTest { |
| 28 | +public class ClassPathMetaModelUrnResolverTest extends MetaModelVersions { |
26 | 29 | @Test
|
27 | 30 | public void testUrlConstruction() {
|
28 | 31 | for ( final KnownVersion version : KnownVersion.getVersions() ) {
|
29 | 32 | final Optional<URL> url = MetaModelUrls.url( "meta-model", version, "aspect-meta-model-definitions.ttl" );
|
30 | 33 | assertThat( url ).isNotEmpty();
|
31 | 34 | }
|
32 | 35 | }
|
| 36 | + |
| 37 | + @ParameterizedTest |
| 38 | + @MethodSource( value = "allVersions" ) |
| 39 | + public void testContainsEntityDefinitions( final KnownVersion metaModelVersion ) { |
| 40 | + assertThat( MetaModelUrls.url( "entity", metaModelVersion, "Point3d.ttl" ) ).isNotEmpty(); |
| 41 | + assertThat( MetaModelUrls.url( "entity", metaModelVersion, "FileResource.ttl" ) ).isNotEmpty(); |
| 42 | + assertThat( MetaModelUrls.url( "entity", metaModelVersion, "TimeSeriesEntity.ttl" ) ).isNotEmpty(); |
| 43 | + } |
33 | 44 | }
|
0 commit comments