Fixing tests
This commit is contained in:
parent
5058481ea9
commit
fb34224e73
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.informationsystem.impl.properties;
|
||||
package org.gcube.informationsystem.model.impl.properties;
|
||||
|
||||
import java.security.Key;
|
||||
import java.security.SecureRandom;
|
||||
|
@ -111,7 +111,7 @@ public class EncryptedTest extends ContextTest {
|
|||
|
||||
@Test
|
||||
public void decryptTest() throws Exception {
|
||||
ContextTest.setContextByName(DEFAULT_TEST_SCOPE);
|
||||
ContextTest.setContextByName(ContextTest.DEFAULT_TEST_SCOPE);
|
||||
String encryptedValue = "yFdK2wXAOLkNoKKx+gopzA==";
|
||||
String decryptedValue = EncryptedImpl.decrypt(encryptedValue);
|
||||
logger.debug("Encrypted Value is : '{}' which decrypted is : '{}'", encryptedValue, decryptedValue);
|
|
@ -4,15 +4,12 @@ import org.gcube.informationsystem.base.reference.entities.EntityElement;
|
|||
import org.gcube.informationsystem.base.reference.properties.PropertyElement;
|
||||
import org.gcube.informationsystem.context.reference.entities.Context;
|
||||
import org.gcube.informationsystem.context.reference.relations.IsParentOf;
|
||||
import org.gcube.informationsystem.model.impl.properties.PropagationConstraintImpl;
|
||||
import org.gcube.informationsystem.model.reference.entities.Entity;
|
||||
import org.gcube.informationsystem.model.reference.entities.Facet;
|
||||
import org.gcube.informationsystem.model.reference.entities.Resource;
|
||||
import org.gcube.informationsystem.model.reference.properties.Encrypted;
|
||||
import org.gcube.informationsystem.model.reference.properties.Header;
|
||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint;
|
||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.AddConstraint;
|
||||
import org.gcube.informationsystem.model.reference.properties.PropagationConstraint.RemoveConstraint;
|
||||
import org.gcube.informationsystem.model.reference.properties.Property;
|
||||
import org.gcube.informationsystem.model.reference.relations.ConsistsOf;
|
||||
import org.gcube.informationsystem.model.reference.relations.IsRelatedTo;
|
||||
|
@ -27,7 +24,6 @@ import org.gcube.informationsystem.types.reference.relations.ConsistsOfType;
|
|||
import org.gcube.informationsystem.types.reference.relations.IsRelatedToType;
|
||||
import org.gcube.informationsystem.types.reference.relations.RelationType;
|
||||
import org.gcube.informationsystem.utils.ElementMapper;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -155,22 +151,6 @@ public class SerializationTest {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPropagationConstraint() throws Exception {
|
||||
PropagationConstraint propagationConstraint = new PropagationConstraintImpl();
|
||||
propagationConstraint.setAddConstraint(AddConstraint.propagate);
|
||||
propagationConstraint.setRemoveConstraint(RemoveConstraint.cascadeWhenOrphan);
|
||||
String pg = ElementMapper.marshal(propagationConstraint);
|
||||
|
||||
Property property = ElementMapper.unmarshal(Property.class, pg);
|
||||
Assert.assertTrue(property instanceof PropagationConstraint);
|
||||
logger.debug(ElementMapper.marshal(property));
|
||||
|
||||
PropagationConstraint pgUnm = ElementMapper.unmarshal(PropagationConstraint.class, pg);
|
||||
Assert.assertTrue(property instanceof PropagationConstraint);
|
||||
logger.debug(ElementMapper.marshal(pgUnm));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTypeSerialization() throws Exception {
|
||||
String serialized = TypeMapper.serializeType(Header.class);
|
||||
|
|
Loading…
Reference in New Issue