From 73677960d4200a1f1f46d759c0d4a958701f56cd Mon Sep 17 00:00:00 2001 From: JPANZO Date: Fri, 18 Feb 2022 17:52:18 +0100 Subject: [PATCH] BordComputer.play; instance of RadioPlayer -> after all preconditions ShouldReturnAnItemToPlay. --- src/main/java/BordComputer.java | 15 +++++---------- src/test/java/BordComputerTest.java | 10 +++++++++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/main/java/BordComputer.java b/src/main/java/BordComputer.java index 6dda364..b00ec43 100644 --- a/src/main/java/BordComputer.java +++ b/src/main/java/BordComputer.java @@ -47,18 +47,10 @@ public class BordComputer { //===== Hilf-Funktionen ====== - public Object getInstanceByName(String deviceName){ + public Device getInstanceByName(String deviceName){ for (int i = 0; i playDate()throws ClassNotFoundException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException { BordComputer bordComputer = new BordComputer(); bordComputer.readConfig(); return Stream.of( - Arguments.of("[CDPlayer-> play(): after all preconditions are met] => ShouldReturnAnItemToPlay","Case1",bordComputer,"CDPlayer") + Arguments.of("[CDPlayer-> play(): after all preconditions are met] => ShouldReturnAnItemToPlay","Case1",bordComputer,"CDPlayer"), + Arguments.of("[RadioPlayer-> play(): after all preconditions are met] => ShouldReturnAnItemToPlay","Case2",bordComputer,"RadioPlayer") ); }