From d424ff222154de20c8b39c70ebeeb9b2d9f8f65c Mon Sep 17 00:00:00 2001 From: sahar Date: Fri, 18 Feb 2022 19:55:22 +0100 Subject: [PATCH] BordComputerTest.changeDeviceTest 8th case --- src/test/java/BordComputerTest.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/test/java/BordComputerTest.java b/src/test/java/BordComputerTest.java index 71a7376..8abb5df 100644 --- a/src/test/java/BordComputerTest.java +++ b/src/test/java/BordComputerTest.java @@ -102,6 +102,8 @@ class BordComputerTest { assertThat(inputBC.changeDevice()).describedAs(testName).contains("USB Player"); }else if (caseNr == 7) { assertThat(inputBC.changeDevice()).describedAs(testName).contains("CDPlayer"); + }else if (caseNr == 8) { + assertThat(inputBC.changeDevice()).describedAs(testName).contains("playlist"); } } @@ -156,6 +158,14 @@ class BordComputerTest { m =bc6.changeDevice(); m =bc6.changeDevice(); + //eighth case + BordComputer bc7 = new BordComputer(); + bc7.readConfig(); + bc7.setDevices(); + m =bc7.changeDevice(); + m =bc7.changeDevice(); + m =bc7.changeDevice(); + return Stream.of( Arguments.of("The order of the installedDevices should be changed ", bc,currentDevices,null,"",1), Arguments.of("The active Device should be changed ", bc1,null,prvDevice,"",2), @@ -163,7 +173,8 @@ class BordComputerTest { Arguments.of("The new Device returns a String ", bc3,null,prvDevice,null,4), Arguments.of("The new Device returns a String ", bc4,null,prvDevice,null,5), Arguments.of("The new Device returns Info ", bc5,null,prvDevice,null,6), - Arguments.of("The new Device returns Info ", bc6,null,prvDevice,null,7) + Arguments.of("The new Device returns Info ", bc6,null,prvDevice,null,7), + Arguments.of("The new Device returns Info ", bc6,null,prvDevice,null,8) ); } } \ No newline at end of file