@Test public void testSuperClassNameFormat() { DescribeSObjectResult dsr = new DescribeSObjectResult(); dsr.setCustom(true); ForceJPAClassRenderer renderer = new ForceJPAClassRenderer(); assertEquals(renderer.toString(dsr, "superClassName"), "com.force.sdk.jpa.model.BaseForceCustomObject", "Unexpected result for DescribeSObjectResultRenderer superClassName format for a custom object"); dsr.setCustom(false); assertEquals(renderer.toString(dsr, "superClassName"), "com.force.sdk.jpa.model.BaseForceObject", "Unexpected result for DescribeSObjectResultRenderer superClassName format for a standard object " + "with missing common fields"); Field idField = new Field(); idField.setName("Id"); idField.setType(FieldType.id); Field nameField = new Field(); nameField.setName("Name"); nameField.setType(FieldType.string); Field ownerField = new Field(); ownerField.setName("OwnerId"); ownerField.setType(FieldType.reference); ownerField.setReferenceTo(new String[] { "User" }); Field createdByIdField = new Field(); createdByIdField.setName("CreatedById"); createdByIdField.setType(FieldType.reference); createdByIdField.setReferenceTo(new String[] { "User" }); Field createdDateField = new Field(); createdDateField.setName("CreatedDate"); createdDateField.setType(FieldType.datetime); Field lastModifiedByIdField = new Field(); lastModifiedByIdField.setName("LastModifiedById"); lastModifiedByIdField.setType(FieldType.reference); lastModifiedByIdField.setReferenceTo(new String[] { "User" }); Field lastModifiedDateField = new Field(); lastModifiedDateField.setName("LastModifiedDate"); lastModifiedDateField.setType(FieldType.datetime); Field systemModstampField = new Field(); systemModstampField.setName("SystemModstamp"); systemModstampField.setType(FieldType.datetime); dsr.setFields(new Field[] { idField, nameField, ownerField, createdByIdField, createdDateField, lastModifiedByIdField, lastModifiedDateField, systemModstampField }); assertEquals(renderer.toString(dsr, "superClassName"), "com.force.sdk.jpa.model.BaseForceStandardObject", "Unexpected result for DescribeSObjectResultRenderer superClassName format for a standard object " + "with all common fields"); }
@Override public String toString(Object o) { return ""; }
ForceJPAClassRenderer implements AttributeRenderer { @Override public String toString(Object o) { return ""; } }
ForceJPAClassRenderer implements AttributeRenderer { @Override public String toString(Object o) { return ""; }  }
ForceJPAClassRenderer implements AttributeRenderer { @Override public String toString(Object o) { return ""; }  @Override String toString(Object o); @Override String toString(Object o, String format); }
ForceJPAClassRenderer implements AttributeRenderer { @Override public String toString(Object o) { return ""; }  @Override String toString(Object o); @Override String toString(Object o, String format);  }