@Test public void getPackageWithoutClassName_NoPackage() { FactIdentifier factIdentifier = new FactIdentifier("test", "Test"); assertEquals(factIdentifier.getPackageWithoutClassName(), ""); }
public String getPackageWithoutClassName() { if (className.contains(".")) { return className.substring(0, className.lastIndexOf(".")); } else { return ""; } }
FactIdentifier { public String getPackageWithoutClassName() { if (className.contains(".")) { return className.substring(0, className.lastIndexOf(".")); } else { return ""; } } }
FactIdentifier { public String getPackageWithoutClassName() { if (className.contains(".")) { return className.substring(0, className.lastIndexOf(".")); } else { return ""; } } FactIdentifier();  FactIdentifier(String name, String className); }
FactIdentifier { public String getPackageWithoutClassName() { if (className.contains(".")) { return className.substring(0, className.lastIndexOf(".")); } else { return ""; } } FactIdentifier();  FactIdentifier(String name, String className); String getName(); String getClassName(); String getClassNameWithoutPackage(); String getPackageWithoutClassName(); static FactIdentifier create(String name, String className); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
FactIdentifier { public String getPackageWithoutClassName() { if (className.contains(".")) { return className.substring(0, className.lastIndexOf(".")); } else { return ""; } } FactIdentifier();  FactIdentifier(String name, String className); String getName(); String getClassName(); String getClassNameWithoutPackage(); String getPackageWithoutClassName(); static FactIdentifier create(String name, String className); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static FactIdentifier INDEX; static FactIdentifier DESCRIPTION; static FactIdentifier EMPTY; }