use of org.apache.cxf.aegis.type.basic.BeanType in project cxf by apache.
the class ConfigurationTest method testNillableDefaultTrue.
@Test
public void testNillableDefaultTrue() throws Exception {
config.setDefaultNillable(true);
AegisType type = tm.getTypeCreator().createType(AnnotatedBean1.class);
BeanTypeInfo info = ((BeanType) type).getTypeInfo();
assertTrue(info.isNillable(new QName(info.getDefaultNamespace(), "bogusProperty")));
}
use of org.apache.cxf.aegis.type.basic.BeanType in project cxf by apache.
the class ConfigurationTest method testMinOccursDefault1.
@Test
public void testMinOccursDefault1() throws Exception {
config.setDefaultMinOccurs(1);
AegisType type = tm.getTypeCreator().createType(AnnotatedBean1.class);
BeanTypeInfo info = ((BeanType) type).getTypeInfo();
assertEquals(info.getMinOccurs(new QName(info.getDefaultNamespace(), "bogusProperty")), 1);
}
use of org.apache.cxf.aegis.type.basic.BeanType in project cxf by apache.
the class JaxbTypeTest method testGetSetRequired.
@Test
public void testGetSetRequired() throws Exception {
BeanType type = new BeanType(new AnnotatedTypeInfo(tm, BadBean.class, "urn:foo", new TypeCreationOptions()));
type.setSchemaType(new QName("urn:foo", "BadBean"));
assertEquals(0, type.getTypeInfo().getElements().size());
}
use of org.apache.cxf.aegis.type.basic.BeanType in project cxf by apache.
the class JaxbTypeTest method testAegisType.
/**
* Test if attributeProperty is correctly mapped to attProp by
* applying the xml mapping file <className>.aegis.xml
*/
@Test
public void testAegisType() {
BeanType type = (BeanType) tm.getTypeCreator().createType(JaxbBean3.class);
assertEquals(0, type.getTypeInfo().getAttributes().size());
Iterator<QName> itr = type.getTypeInfo().getElements().iterator();
assertTrue(itr.hasNext());
QName q = itr.next();
assertEquals("attProp", q.getLocalPart());
}
use of org.apache.cxf.aegis.type.basic.BeanType in project cxf by apache.
the class JaxbTypeTest method testExtensibilityOff.
@Test
public void testExtensibilityOff() {
BeanType type = (BeanType) tm.getTypeCreator().createType(JaxbBean4.class);
assertFalse(type.getTypeInfo().isExtensibleElements());
assertFalse(type.getTypeInfo().isExtensibleAttributes());
}
Aggregations