public String getName() {
String name = properties.get(CoreProperties.PROJECT_NAME_PROPERTY);
if (StringUtils.isBlank(name)) {
- name = "Unnamed - " + getKey();
+ name = getKey();
}
return name;
}
public void shouldSupportDefaultName() {
ProjectDefinition def = ProjectDefinition.create();
def.setKey("myKey");
- assertThat(def.getName()).isEqualTo("Unnamed - myKey");
+ assertThat(def.getName()).isEqualTo("myKey");
}
@Test
public void shouldAcceptNoProjectName() {
ProjectDefinition rootProject = loadProjectDefinition("simple-project-with-missing-project-name");
assertThat(rootProject.getOriginalName()).isNull();
- assertThat(rootProject.getName()).isEqualTo("Unnamed - com.foo.project");
+ assertThat(rootProject.getName()).isEqualTo("com.foo.project");
}
@Test