added more test examples

master
Eline 2023-01-09 13:47:19 +01:00
parent 1846c66dc5
commit 48a7b45a65
1 changed files with 30 additions and 1 deletions

View File

@ -37,8 +37,37 @@ public class R2D2Test<SystemOutRule, OutputCapture> {
var list = new int[]{12,6,7,10,18,2};
Robot robot= RobotFactory.getRobot(Typ.R2D2,"roboter2");
Assert.assertEquals("2,6,7,10,12,18",robot.speak(list));
var list1 = new int[] {17,10,19,1,4,2,7};
Assert.assertEquals("1,2,4,7,10,17,19", robot.speak(list));
var list2 = new int[] {3,17,7,20,5,15,8};
Assert.assertEquals("3,5,7,8,15,17,20", robot.speak(list));
var list3 = new int[] {13,8,5,12,1,9,7};
Assert.assertEquals("1,5,7,8,9,12,13", robot.speak(list));
var list4 = new int[] {18,4,21,7,3,2,9};
Assert.assertEquals("2,3,4,7,9,18,21", robot.speak(list));
var list5 = new int[] {13,23,8,4,22,6};
Assert.assertEquals("4,6,8,13,22,23", robot.speak(list));
var list6 = new int[] {10,9,8,7,6,5};
Assert.assertEquals("5,6,7,8,9,10", robot.speak(list));
var list7 = new int[] {1,2,3,5,4,6};
Assert.assertEquals("1,2,3,4,5,6", robot.speak(list));
var list8 = new int[] {20,19,18,17,16,15};
Assert.assertEquals("15,16,17,18,19,20", robot.speak(list));
var list9 = new int[] {15,1,13,10,7,4};
Assert.assertEquals("1,4,7,10,13,15", robot.speak(list));
var list10 = new int[] {10,15,11,8,5,6,};
Assert.assertEquals("5,6,8,10,11,15", robot.speak(list));
}
}