header += " explanation: String\n";
header += " insuranceCost: Integer\n";
header += " applicant: Applicant\n";
header += "end\n";
SuggestionCompletionEngine eng = loader.getSuggestionEngine( header,
new ArrayList(),
new ArrayList() );
assertNotNull( eng );
assertEquals( SuggestionCompletionEngine.TYPE_STRING,
eng.getFieldType( "Applicant",
"creditRating" ) );
assertEquals( "java.lang.String",
eng.getFieldClassName( "Applicant",
"creditRating" ) );
assertEquals( FIELD_CLASS_TYPE.TYPE_DECLARATION_CLASS,
eng.getFieldClassType( "Applicant",
"creditRating" ) );
assertEquals( SuggestionCompletionEngine.TYPE_NUMERIC,
eng.getFieldType( "LoanApplication",
"deposit" ) );
assertEquals( "java.lang.Integer",
eng.getFieldClassName( "LoanApplication",
"deposit" ) );
assertEquals( FIELD_CLASS_TYPE.TYPE_DECLARATION_CLASS,
eng.getFieldClassType( "LoanApplication",
"deposit" ) );
assertEquals( "Applicant",
eng.getFieldType( "LoanApplication",
"applicant" ) );
assertEquals( "Applicant",
eng.getFieldClassName( "LoanApplication",
"applicant" ) );
assertEquals( FIELD_CLASS_TYPE.TYPE_DECLARATION_CLASS,
eng.getFieldClassType( "LoanApplication",
"applicant" ) );
}