Browse Source

BordComputerTest.changeDeviceTest forth case

feature-dev-BoardComputer2
sahar 3 years ago
parent
commit
2a566d0a29
  1. 12
      src/test/java/BordComputerTest.java

12
src/test/java/BordComputerTest.java

@ -94,6 +94,8 @@ class BordComputerTest {
assertThat(currentDevice).describedAs(testName).isNotEqualTo(prvDevice); assertThat(currentDevice).describedAs(testName).isNotEqualTo(prvDevice);
}else if (caseNr == 3) { }else if (caseNr == 3) {
assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull(); assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull();
}else if (caseNr == 4) {
assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull();
} }
} }
@ -120,12 +122,20 @@ class BordComputerTest {
bc2.setDevices(); bc2.setDevices();
m =bc2.changeDevice(); m =bc2.changeDevice();
//forth case
BordComputer bc3 = new BordComputer();
bc3.readConfig();
bc3.setDevices();
m =bc3.changeDevice();
m =bc3.changeDevice(); //CDPlayer
return Stream.of( return Stream.of(
Arguments.of("The order of the installedDevices should be changed ", bc,currentDevices,null,"",1), 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 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)
); );
} }
} }
Loading…
Cancel
Save