@Test void appendPackageShouldAddPackageInFullyQualifiedClassNameWhenAPackagePartAlreadyExists() { String name = "part.MyClass"; String packageName = "org.apache"; assertThat(new ClassName(name).appendPackage(PackageName.of(packageName))) .isEqualTo(new FullyQualifiedClassName("org.apache.part.MyClass")); }
FullyQualifiedClassName appendPackage(PackageName aPackage) { return new FullyQualifiedClassName(aPackage.getName() + "." + name); }
ClassName { FullyQualifiedClassName appendPackage(PackageName aPackage) { return new FullyQualifiedClassName(aPackage.getName() + "." + name); } }
ClassName { FullyQualifiedClassName appendPackage(PackageName aPackage) { return new FullyQualifiedClassName(aPackage.getName() + "." + name); } ClassName(String name); }
ClassName { FullyQualifiedClassName appendPackage(PackageName aPackage) { return new FullyQualifiedClassName(aPackage.getName() + "." + name); } ClassName(String name); String getName(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString(); }
ClassName { FullyQualifiedClassName appendPackage(PackageName aPackage) { return new FullyQualifiedClassName(aPackage.getName() + "." + name); } ClassName(String name); String getName(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override String toString();  }