Browse Source

BordComputerTest.changeDeviceTest 6th case

feature-dev-BoardComputer2
sahar 3 years ago
parent
commit
080badc8cf
  1. 11
      src/test/java/BordComputerTest.java

11
src/test/java/BordComputerTest.java

@ -98,6 +98,8 @@ class BordComputerTest {
assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull(); assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull();
}else if (caseNr == 5) { }else if (caseNr == 5) {
assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull(); assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull();
}else if (caseNr == 6) {
assertThat(inputBC.changeDevice()).describedAs(testName).contains("USB Player");
} }
} }
@ -139,12 +141,19 @@ class BordComputerTest {
m =bc4.changeDevice(); //CDPlayer m =bc4.changeDevice(); //CDPlayer
m =bc4.changeDevice(); m =bc4.changeDevice();
//sixth case
BordComputer bc5 = new BordComputer();
bc5.readConfig();
bc5.setDevices();
m =bc5.changeDevice();
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), 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 a String ", bc4,null,prvDevice,null,5),
Arguments.of("The new Device returns Info ", bc5,null,prvDevice,null,6)
); );
} }
} }
Loading…
Cancel
Save