Browse Source

BordComputerTest.changeDeviceTest 9th case

feature-dev-BoardComputerTests
sahar 3 years ago
parent
commit
5e625ef405
  1. 15
      src/test/java/BordComputerTest.java

15
src/test/java/BordComputerTest.java

@ -101,8 +101,10 @@ class BordComputerTest {
assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull(); assertThat(inputBC.changeDevice()).describedAs(testName).isNotNull();
}else if (caseNr == 6) { }else if (caseNr == 6) {
assertThat(inputBC.changeDevice()).describedAs(testName).contains("USB Player"); assertThat(inputBC.changeDevice()).describedAs(testName).contains("USB Player");
}else if (caseNr == 7) {
}else if (caseNr == 7) {//playlist
assertThat(inputBC.changeDevice()).describedAs(testName).contains("CDPlayer"); assertThat(inputBC.changeDevice()).describedAs(testName).contains("CDPlayer");
}else if (caseNr == 8) {//
assertThat(inputBC.changeDevice()).describedAs(testName).contains("playlist");
} }
} }
@ -157,6 +159,14 @@ class BordComputerTest {
m =bc6.changeDevice(); m =bc6.changeDevice();
m =bc6.changeDevice(); m =bc6.changeDevice();
//eight case
BordComputer bc7 = new BordComputer();
bc7.readConfig();
bc7.setDevices();
m =bc7.changeDevice();
m =bc7.changeDevice();
m =bc7.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),
@ -164,7 +174,8 @@ class BordComputerTest {
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), 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)
); );
} }

Loading…
Cancel
Save