OresHelper { public static boolean isOfType(OLATResourceable ores, Class aClass) { String type = ores.getResourceableTypeName(); String calcName = calculateTypeName(aClass, null); boolean ok = (type.equals(calcName)); return ok; }  static OLATResourceable createOLATResourceableInstance(final String type, final Long key); static OLATResourceable createOLATResourceableType(final String type, final String subtype); static OLATResourceable createOLATResourceableType(final String type); static OLATResourceable createOLATResourceableType(Class clazz); static OLATResourceable createOLATResourceableInstance(Class aClass, final Long key); static String createStringRepresenting(OLATResourceable ores, String subKey); static String createStringRepresenting(OLATResourceable ores); static OLATResourceable lookupType(Class aClass); static String calculateTypeName(Class aClass); static String calculateTypeName(Class aClass, String subType); static boolean isOfType(OLATResourceable ores, Class aClass); static OLATResourceable lookupType(Class aClass, String subType); static boolean equals(OLATResourceable a, OLATResourceable b); static OLATResourceable createOLATResourceableTypeWithoutCheck(String type); static OLATResourceable createOLATResourceableInstanceWithoutCheck(final String type, final Long key); static final int ORES_TYPE_LENGTH; }
@Test public void isOfType() { assertTrue(OresHelper.isOfType(oLATResourceable, classInstance)); assertFalse(OresHelper.isOfType(oLATResourceable, ICourse.class)); }