Search in sources :

Example 16 with PrimitiveArray

use of org.hibernate.mapping.PrimitiveArray in project jbosstools-hibernate by jbosstools.

the class ValueFacadeTest method testIsPrimitiveArray.

@Test
public void testIsPrimitiveArray() {
    SimpleValue simpleValueTarget = new SimpleValue(null);
    valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
    assertFalse(valueFacade.isPrimitiveArray());
    PrimitiveArray primitiveArrayTarget = new PrimitiveArray(null, null);
    valueFacade = FACADE_FACTORY.createValue(primitiveArrayTarget);
    assertTrue(valueFacade.isPrimitiveArray());
}
Also used : PrimitiveArray(org.hibernate.mapping.PrimitiveArray) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.jupiter.api.Test)

Example 17 with PrimitiveArray

use of org.hibernate.mapping.PrimitiveArray in project jbosstools-hibernate by jbosstools.

the class ValueFacadeTest method testIsPrimitiveArray.

@Test
public void testIsPrimitiveArray() {
    SimpleValue simpleValueTarget = new SimpleValue();
    valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
    Assert.assertFalse(valueFacade.isPrimitiveArray());
    PrimitiveArray primitiveArrayTarget = new PrimitiveArray(null);
    valueFacade = FACADE_FACTORY.createValue(primitiveArrayTarget);
    Assert.assertTrue(valueFacade.isPrimitiveArray());
}
Also used : PrimitiveArray(org.hibernate.mapping.PrimitiveArray) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.Test)

Example 18 with PrimitiveArray

use of org.hibernate.mapping.PrimitiveArray in project jbosstools-hibernate by jbosstools.

the class ServiceImplTest method testNewPrimitiveArray.

@Test
public void testNewPrimitiveArray() {
    IPersistentClass persistentClass = service.newRootClass();
    IValue primitiveArray = service.newPrimitiveArray(persistentClass);
    assertNotNull(primitiveArray);
    Object target = ((IFacade) primitiveArray).getTarget();
    assertNotNull(target);
    assertTrue(target instanceof PrimitiveArray);
}
Also used : IValue(org.jboss.tools.hibernate.runtime.spi.IValue) PrimitiveArray(org.hibernate.mapping.PrimitiveArray) IFacade(org.jboss.tools.hibernate.runtime.common.IFacade) IPersistentClass(org.jboss.tools.hibernate.runtime.spi.IPersistentClass) Test(org.junit.jupiter.api.Test)

Example 19 with PrimitiveArray

use of org.hibernate.mapping.PrimitiveArray in project jbosstools-hibernate by jbosstools.

the class ValueFacadeTest method testIsPrimitiveArray.

@Test
public void testIsPrimitiveArray() {
    SimpleValue simpleValueTarget = new SimpleValue(null);
    valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
    assertFalse(valueFacade.isPrimitiveArray());
    PrimitiveArray primitiveArrayTarget = new PrimitiveArray(null, null);
    valueFacade = FACADE_FACTORY.createValue(primitiveArrayTarget);
    assertTrue(valueFacade.isPrimitiveArray());
}
Also used : PrimitiveArray(org.hibernate.mapping.PrimitiveArray) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.jupiter.api.Test)

Example 20 with PrimitiveArray

use of org.hibernate.mapping.PrimitiveArray in project jbosstools-hibernate by jbosstools.

the class ValueFacadeTest method testIsPrimitiveArray.

@Test
public void testIsPrimitiveArray() {
    SimpleValue simpleValueTarget = new SimpleValue(DummyMetadataBuildingContext.INSTANCE, null);
    valueFacade = FACADE_FACTORY.createValue(simpleValueTarget);
    assertFalse(valueFacade.isPrimitiveArray());
    PrimitiveArray primitiveArrayTarget = new PrimitiveArray(DummyMetadataBuildingContext.INSTANCE, null);
    valueFacade = FACADE_FACTORY.createValue(primitiveArrayTarget);
    assertTrue(valueFacade.isPrimitiveArray());
}
Also used : PrimitiveArray(org.hibernate.mapping.PrimitiveArray) SimpleValue(org.hibernate.mapping.SimpleValue) Test(org.junit.jupiter.api.Test)

Aggregations

PrimitiveArray (org.hibernate.mapping.PrimitiveArray)25 Test (org.junit.jupiter.api.Test)22 SimpleValue (org.hibernate.mapping.SimpleValue)13 IFacade (org.jboss.tools.hibernate.runtime.common.IFacade)11 IPersistentClass (org.jboss.tools.hibernate.runtime.spi.IPersistentClass)11 IValue (org.jboss.tools.hibernate.runtime.spi.IValue)11 Array (org.hibernate.mapping.Array)2 Bag (org.hibernate.mapping.Bag)2 IdentifierBag (org.hibernate.mapping.IdentifierBag)2 Set (org.hibernate.mapping.Set)2 Test (org.junit.Test)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 AssertionFailure (org.hibernate.AssertionFailure)1 MetadataSources (org.hibernate.boot.MetadataSources)1 PluralAttributeSourceArray (org.hibernate.boot.model.source.spi.PluralAttributeSourceArray)1 MetadataImplementor (org.hibernate.boot.spi.MetadataImplementor)1 Any (org.hibernate.mapping.Any)1