From 2a566d0a29c73a3c6ee176e6101e62f8c406bf4d Mon Sep 17 00:00:00 2001 From: sahar Date: Fri, 18 Feb 2022 19:47:06 +0100 Subject: [PATCH] BordComputerTest.changeDeviceTest forth case --- src/test/java/BordComputerTest.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/test/java/BordComputerTest.java b/src/test/java/BordComputerTest.java index 422d7ef..e801a36 100644 --- a/src/test/java/BordComputerTest.java +++ b/src/test/java/BordComputerTest.java @@ -94,6 +94,8 @@ class BordComputerTest { assertThat(currentDevice).describedAs(testName).isNotEqualTo(prvDevice); }else if (caseNr == 3) { assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull(); + }else if (caseNr == 4) { + assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull(); } } @@ -120,12 +122,20 @@ class BordComputerTest { bc2.setDevices(); m =bc2.changeDevice(); + //forth case + BordComputer bc3 = new BordComputer(); + bc3.readConfig(); + bc3.setDevices(); + m =bc3.changeDevice(); + m =bc3.changeDevice(); //CDPlayer + 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), - Arguments.of("The new Device returns a String ", bc2,null,prvDevice,bc2.activeDevice.toString(),3) + Arguments.of("The new Device returns a String ", bc2,null,prvDevice,bc2.activeDevice.toString(),3), + Arguments.of("The new Device returns a String ", bc3,null,prvDevice,null,4) ); } } \ No newline at end of file