|
|
@ -1,4 +1,5 @@ |
|
|
|
import device.Device; |
|
|
|
import device.cdPlayer.CD; |
|
|
|
import device.cdPlayer.CDPlayer; |
|
|
|
import device.radioPlayer.RadioPlayer; |
|
|
|
import device.usbPlayer.USB_Stick; |
|
|
@ -94,6 +95,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,11 +123,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) |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|