Text.java method index changed output format

This commit is contained in:
Andrin Fassbind 2021-11-05 11:41:10 +01:00
parent 7d256f9915
commit 9a05956582
2 changed files with 7 additions and 3 deletions

View File

@ -146,8 +146,12 @@ public class Text {
if (values.get(0) >= 3) {
input += key + " ";
for (int i = 1; i < values.size(); i++) {
if(i+1 == values.size()){
input += values.get(i)+"";
}else {
input += values.get(i) + ", ";
}
}
output.add(input);
}
}

View File

@ -20,6 +20,6 @@ public class TextTest {
txt.add("Hallo, wie zusammen");
txt.add("Hallo,wie wie zusammen");
sListe= txt.index();
Assertions.assertEquals("Hallo 1, 2, 3, ",sListe.get(0));
Assertions.assertEquals("Hallo 1, 2, 3",sListe.get(0));
}
}