Fixed test due to TypeVersion class renamed to Version

This commit is contained in:
Luca Frosini 2021-10-21 10:23:10 +02:00
parent e64e3b9dc4
commit b596c3c795
4 changed files with 11 additions and 11 deletions

View File

@ -26,7 +26,7 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.Schema
import org.gcube.informationsystem.types.TypeMapper; import org.gcube.informationsystem.types.TypeMapper;
import org.gcube.informationsystem.types.reference.Type; import org.gcube.informationsystem.types.reference.Type;
import org.gcube.informationsystem.types.reference.relations.RelationType; import org.gcube.informationsystem.types.reference.relations.RelationType;
import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.informationsystem.utils.Version;
import org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet; import org.gcube.resourcemanagement.model.reference.entities.facets.AccessPointFacet;
import org.gcube.resourcemanagement.model.reference.entities.facets.ContactFacet; import org.gcube.resourcemanagement.model.reference.entities.facets.ContactFacet;
import org.gcube.resourcemanagement.model.reference.entities.resources.Actor; import org.gcube.resourcemanagement.model.reference.entities.resources.Actor;
@ -289,13 +289,13 @@ public class SchemaManagementImplTest extends ContextTest {
Assert.assertTrue(typeManaged.getSuperClasses().containsAll(type.getSuperClasses())); Assert.assertTrue(typeManaged.getSuperClasses().containsAll(type.getSuperClasses()));
Map<TypeVersion, String> typeChangelog = type.getChangelog(); Map<Version, String> typeChangelog = type.getChangelog();
Map<TypeVersion, String> typeManagedChangelog = typeManaged.getChangelog(); Map<Version, String> typeManagedChangelog = typeManaged.getChangelog();
Assert.assertTrue(typeChangelog.keySet().containsAll(typeManagedChangelog.keySet())); Assert.assertTrue(typeChangelog.keySet().containsAll(typeManagedChangelog.keySet()));
Assert.assertTrue(typeManagedChangelog.keySet().containsAll(typeChangelog.keySet())); Assert.assertTrue(typeManagedChangelog.keySet().containsAll(typeChangelog.keySet()));
for(TypeVersion typeVersion : typeChangelog.keySet()) { for(Version typeVersion : typeChangelog.keySet()) {
Assert.assertTrue(typeChangelog.get(typeVersion).compareTo(typeManagedChangelog.get(typeVersion))==0); Assert.assertTrue(typeChangelog.get(typeVersion).compareTo(typeManagedChangelog.get(typeVersion))==0);
} }

View File

@ -8,7 +8,7 @@ import org.gcube.informationsystem.model.reference.entities.Facet;
import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.annotations.ISProperty;
import org.gcube.informationsystem.types.reference.Change; import org.gcube.informationsystem.types.reference.Change;
import org.gcube.informationsystem.types.reference.TypeMetadata; import org.gcube.informationsystem.types.reference.TypeMetadata;
import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.informationsystem.utils.Version;
import org.gcube.resourcemanagement.model.impl.entities.facets.SimpleFacetImpl; import org.gcube.resourcemanagement.model.impl.entities.facets.SimpleFacetImpl;
/** /**
@ -18,9 +18,9 @@ import org.gcube.resourcemanagement.model.impl.entities.facets.SimpleFacetImpl;
@TypeMetadata( @TypeMetadata(
name = TestFacet.NAME, name = TestFacet.NAME,
description = "TestFacet 1.0.0", description = "TestFacet 1.0.0",
version = TypeVersion.MINIMAL_VERSION_STRING version = Version.MINIMAL_VERSION_STRING
) )
@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) @Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION)
public interface TestFacet extends Facet { public interface TestFacet extends Facet {
public static final String NAME = "TestFacet"; // SimpleFacet.class.getSimpleName(); public static final String NAME = "TestFacet"; // SimpleFacet.class.getSimpleName();

View File

@ -8,7 +8,7 @@ import org.gcube.informationsystem.model.reference.entities.Facet;
import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.annotations.ISProperty;
import org.gcube.informationsystem.types.reference.Change; import org.gcube.informationsystem.types.reference.Change;
import org.gcube.informationsystem.types.reference.TypeMetadata; import org.gcube.informationsystem.types.reference.TypeMetadata;
import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.informationsystem.utils.Version;
import org.gcube.resourcemanagement.model.impl.entities.facets.SimpleFacetImpl; import org.gcube.resourcemanagement.model.impl.entities.facets.SimpleFacetImpl;
/** /**
@ -20,7 +20,7 @@ import org.gcube.resourcemanagement.model.impl.entities.facets.SimpleFacetImpl;
description = "TestFacet 1.0.1", description = "TestFacet 1.0.1",
version = "1.0.1" version = "1.0.1"
) )
@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) @Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION)
@Change(version = "1.0.1", description = "Removed 'name' property, added 'title' property.") @Change(version = "1.0.1", description = "Removed 'name' property, added 'title' property.")
public interface TestFacet1_0_1 extends Facet { public interface TestFacet1_0_1 extends Facet {

View File

@ -8,7 +8,7 @@ import org.gcube.informationsystem.model.reference.entities.Facet;
import org.gcube.informationsystem.types.annotations.ISProperty; import org.gcube.informationsystem.types.annotations.ISProperty;
import org.gcube.informationsystem.types.reference.Change; import org.gcube.informationsystem.types.reference.Change;
import org.gcube.informationsystem.types.reference.TypeMetadata; import org.gcube.informationsystem.types.reference.TypeMetadata;
import org.gcube.informationsystem.utils.TypeVersion; import org.gcube.informationsystem.utils.Version;
import org.gcube.resourcemanagement.model.impl.entities.facets.SimpleFacetImpl; import org.gcube.resourcemanagement.model.impl.entities.facets.SimpleFacetImpl;
/** /**
@ -20,7 +20,7 @@ import org.gcube.resourcemanagement.model.impl.entities.facets.SimpleFacetImpl;
description = "TestFacet 1.0.2", description = "TestFacet 1.0.2",
version = "1.0.2" version = "1.0.2"
) )
@Change(version = TypeVersion.MINIMAL_VERSION_STRING, description = TypeVersion.MINIMAL_VERSION_DESCRIPTION) @Change(version = Version.MINIMAL_VERSION_STRING, description = Version.MINIMAL_VERSION_DESCRIPTION)
@Change(version = "1.0.1", description = "Removed 'name' property, added 'title' property.") @Change(version = "1.0.1", description = "Removed 'name' property, added 'title' property.")
@Change(version = "1.0.2", description = "Restored 'name' property. Set 'title' property as not mandatory and nullable.") @Change(version = "1.0.2", description = "Restored 'name' property. Set 'title' property as not mandatory and nullable.")
public interface TestFacet1_0_2 extends Facet { public interface TestFacet1_0_2 extends Facet {