Commit 1fca4d0a authored by Andreas Heilemann's avatar Andreas Heilemann
Browse files

[1] more tests

parent d44b20c9
...@@ -9,6 +9,26 @@ public class JsonparserApplication { ...@@ -9,6 +9,26 @@ public class JsonparserApplication {
// TODO // TODO
} }
public String getProjectName() {
// TODO
return "TODO";
}
public String getProjectCategory() {
// TODO
return "TODO";
}
public List<String> getIssueTypes() {
// TODO
return null;
}
public List<String> getIssueTypesHavingSubtasks() {
// TODO
return null;
}
public String getLeadDisplayName() { public String getLeadDisplayName() {
// TODO // TODO
return "TODO"; return "TODO";
......
...@@ -23,6 +23,34 @@ class JsonparserApplicationTests { ...@@ -23,6 +23,34 @@ class JsonparserApplicationTests {
sut = new JsonparserApplication(content); sut = new JsonparserApplication(content);
} }
@Test
void testGetProjectName() {
String actual = sut.getProjectName();
assertThat(actual).isEqualTo("123-Musterprojekt");
}
@Test
void testGetProjectCategory() {
String actual = sut.getProjectCategory();
assertThat(actual).isEqualTo("Softwareprojekt");
}
@Test
void testGetIssueTypes() {
List<String> actual = sut.getIssueTypes();
assertThat(actual.size()).isEqualTo(5);
assertThat(actual).contains("Bearbeitung DM");
assertThat(actual).contains("Öffentliche FuE-Projekt");
}
@Test
void testGetIssueTypesHavingSubtasks() {
List<String> actual = sut.getIssueTypesHavingSubtasks();
assertThat(actual.size()).isEqualTo(3);
assertThat(actual).contains("Bearbeitung DM");
assertThat(actual).contains("Sub-Task");
}
@Test @Test
void testGetLeadDisplayName() { void testGetLeadDisplayName() {
String actual = sut.getLeadDisplayName(); String actual = sut.getLeadDisplayName();
...@@ -32,8 +60,8 @@ class JsonparserApplicationTests { ...@@ -32,8 +60,8 @@ class JsonparserApplicationTests {
@Test @Test
void testGetAllIssueTypeIdsWhereNameStartsWith() { void testGetAllIssueTypeIdsWhereNameStartsWith() {
List<String> actual = sut.getAllIssueTypeIdsWhereNameStartsWith("Vertrag"); List<String> actual = sut.getAllIssueTypeIdsWhereNameStartsWith("Vertrag");
assertThat(actual).contains("10807");
assertThat(actual.size()).isEqualTo(2); assertThat(actual.size()).isEqualTo(2);
assertThat(actual).contains("10807");
assertThat(actual).contains("10808"); assertThat(actual).contains("10808");
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment