@Test
public void testDataTypes() throws Exception {
setKSession(getModelSession(source,VERBOSE));
setKbase(getKSession().getKieBase());
FactType gender = getKbase().getFactType(packageName,"Gender");
FactType noclaims = getKbase().getFactType(packageName,"NoOfClaims");
FactType scrambled = getKbase().getFactType(packageName,"Scrambled");
FactType domicile = getKbase().getFactType(packageName,"Domicile");
FactType agecar = getKbase().getFactType(packageName,"AgeOfCar");
FactType amklaims = getKbase().getFactType(packageName,"AmountOfClaims");
Object g = gender.newInstance();
assertEquals( "org.drools.pmml.pmml_4_2.test.Gender", g.getClass().getName() );
gender.set(g,"value","M");
assertEquals( "M", gender.get( g, "value" ) );
Object n = noclaims.newInstance();
assertEquals( "org.drools.pmml.pmml_4_2.test.NoOfClaims", n.getClass().getName() );
noclaims.set(n, "value", "> 3");
assertEquals( "> 3", noclaims.get( n, "value" ) );
Object s = scrambled.newInstance();
assertEquals( "org.drools.pmml.pmml_4_2.test.Scrambled", s.getClass().getName() );
scrambled.set(s, "value", 1);
assertEquals( 1, scrambled.get( s, "value" ) );
Object d = domicile.newInstance();
assertEquals( "org.drools.pmml.pmml_4_2.test.Domicile", d.getClass().getName() );
domicile.set(d, "value", "SomeWhere");
assertEquals( "SomeWhere", domicile.get( d, "value" ) );
Object a = agecar.newInstance();
assertEquals( "org.drools.pmml.pmml_4_2.test.AgeOfCar", a.getClass().getName() );
agecar.set(a, "value", 24.3);
assertEquals( 24.3, agecar.get( a, "value" ) );
Object k = amklaims.newInstance();
assertEquals( "org.drools.pmml.pmml_4_2.test.AmountOfClaims", k.getClass().getName() );
amklaims.set(k, "value", 9);
assertEquals( 9, amklaims.get( k, "value" ) );
try {
agecar.set(a,"value","Not a String field");
Assert.fail();