Skip to content

Commit

Permalink
fixup! build: fix issues and failing tests after migration
Browse files Browse the repository at this point in the history
  • Loading branch information
stempler committed Aug 16, 2024
1 parent b2c2346 commit fa3866a
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import eu.esdihumboldt.hale.common.instance.model.Instance
import eu.esdihumboldt.hale.common.instance.model.InstanceCollection
import eu.esdihumboldt.hale.common.schema.model.Schema
import eu.esdihumboldt.hale.common.test.TestUtil
import eu.esdihumboldt.util.nonosgi.Init
import eu.esdihumboldt.util.test.AbstractPlatformTest
import org.junit.BeforeClass
import org.junit.Test

Expand All @@ -18,6 +20,8 @@ class ReferenceGraphTest {

@BeforeClass
static void init() {
Init.init()

TestUtil.startConversionService()
def inspireAddressesUri = URI.create("http://inspire.ec.europa.eu/schemas/au/3.0/AdministrativeUnits.xsd")
INSPIRE_ADDRESSES_SCHEMA = TestUtil.loadSchema(inspireAddressesUri)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

package eu.esdihumboldt.hale.common.instance.groovy

import static org.junit.Assert.*

import eu.esdihumboldt.hale.common.instance.model.Group
import eu.esdihumboldt.hale.common.instance.model.Instance
import eu.esdihumboldt.hale.common.schema.groovy.SchemaBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

package eu.esdihumboldt.hale.common.instance.groovy

import static org.junit.Assert.*

import eu.esdihumboldt.hale.common.align.transformation.function.impl.FamilyInstanceImpl
import eu.esdihumboldt.hale.common.instance.model.FamilyInstance
import eu.esdihumboldt.hale.common.instance.model.Instance
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'hale.migrated-java'
id 'hale.migrated-groovy'
}

hale {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,15 @@

package eu.esdihumboldt.hale.common.instance.index;

import static org.junit.Assert.*;

import javax.xml.namespace.QName;

import org.junit.Test;

import eu.esdihumboldt.hale.common.align.model.ChildContext;
import eu.esdihumboldt.hale.common.align.model.impl.PropertyEntityDefinition;
import eu.esdihumboldt.hale.common.schema.SchemaSpaceID;
import eu.esdihumboldt.hale.common.schema.model.impl.DefaultPropertyDefinition;
import eu.esdihumboldt.hale.common.schema.model.impl.DefaultTypeDefinition;
import static org.junit.Assert.*

import eu.esdihumboldt.hale.common.align.model.ChildContext
import eu.esdihumboldt.hale.common.align.model.impl.PropertyEntityDefinition
import eu.esdihumboldt.hale.common.schema.SchemaSpaceID
import eu.esdihumboldt.hale.common.schema.model.impl.DefaultPropertyDefinition
import eu.esdihumboldt.hale.common.schema.model.impl.DefaultTypeDefinition
import javax.xml.namespace.QName
import org.junit.Test

/**
* Tests for {@link MultimapInstanceIndex}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import eu.esdihumboldt.hale.common.schema.persist.hsd.HaleSchemaReader
import eu.esdihumboldt.hale.common.schema.persist.hsd.HaleSchemaUtil
import eu.esdihumboldt.hale.common.schema.persist.hsd.HaleSchemaWriter
import eu.esdihumboldt.hale.common.test.TestUtil
import eu.esdihumboldt.util.test.AbstractPlatformTest
import eu.esdihumboldt.util.validator.EnumerationValidator
import eu.esdihumboldt.util.validator.Validator
import groovy.transform.CompileStatic
Expand All @@ -56,7 +57,7 @@ import org.junit.Test
*
* @author Simon Templer
*/
class HaleSchemaWriterTest {
class HaleSchemaWriterTest extends AbstractPlatformTest {

/**
* Test with a simple schema with the type Person, result is validated based on the HSD XSD.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class DefinitionResolverTest {

@CompileStatic(TypeCheckingMode.SKIP)
@Before
protected void setUp() throws Exception {
void setUp() throws Exception {
new SchemaBuilder(defaultPropertyTypeNamespace: PROPERTY_NS).schema(MAIN_NS) {
itemType = Item {
name()
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
/*
* Copyright (c) 2014 Data Harmonisation Panel
*
*
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution. If not, see <http://www.gnu.org/licenses/>.
*
*
* Contributors:
* Data Harmonisation Panel <http://www.dhpanel.eu>
*/

package eu.esdihumboldt.hale.common.schema.model.constraint.factory;

import eu.esdihumboldt.hale.common.schema.model.TypeConstraint
import static org.junit.Assert.*

import eu.esdihumboldt.hale.common.schema.model.TypeConstraint

/**
* Base class for {@link ValueConstraintFactory} tests that use simple property
* comparision to compare original and restored constraints.
*
*
* @author Simon Templer
*/
abstract class AbstractPropertiesCompareConstraintFactoryTest<T> extends
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import eu.esdihumboldt.hale.common.schema.model.impl.DefaultTypeDefinition;
import eu.esdihumboldt.hale.common.test.TestUtil;
import eu.esdihumboldt.util.groovy.xml.NSDOMBuilder;
import eu.esdihumboldt.util.test.AbstractPlatformTest;
import java.util.HashMap;
import java.util.Map;
import javax.xml.namespace.QName;
Expand All @@ -43,7 +44,7 @@
* @author Simon Templer
* @param <T> the constraint type
*/
public abstract class AbstractValueConstraintFactoryTest<T> {
public abstract class AbstractValueConstraintFactoryTest<T> extends AbstractPlatformTest {

private static final QName DEF_PROPERTY_TYPE_NAME = new QName("TestPropertyType");
private static final QName DEF_TYPE_NAME = new QName("TestType");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

package eu.esdihumboldt.hale.common.schema.model.constraint.factory.type

import static org.junit.Assert.*

import eu.esdihumboldt.hale.common.schema.model.TypeDefinition
import eu.esdihumboldt.hale.common.schema.model.constraint.factory.AbstractValueConstraintFactoryTest
import eu.esdihumboldt.hale.common.schema.model.constraint.type.ValidationConstraint
Expand All @@ -31,7 +33,6 @@ import eu.esdihumboldt.util.validator.Validator
import javax.xml.namespace.QName
import org.junit.Test


/**
* Tests for {@link ValidationConstraintFactory}.
*
Expand Down
2 changes: 1 addition & 1 deletion util/plugins/eu.esdihumboldt.util.test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ description = 'General utilities for tests'
dependencies {
implementation testLibs.junit4

implementation project(':util:plugins:eu.esdihumboldt.util.nonosgi')
api project(':util:plugins:eu.esdihumboldt.util.nonosgi')
}

0 comments on commit fa3866a

Please sign in to comment.