From 54ac5f48b32f398f1329ebd22b94b9fa36fe9e37 Mon Sep 17 00:00:00 2001 From: alpina0707 Date: Mon, 14 Feb 2022 23:28:13 +0100 Subject: [PATCH] added new test case for play() & changed play() to show if playedStation is in regional or saved playlist --- src/test/java/device/radioPlayer/RadioPlayerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/device/radioPlayer/RadioPlayerTest.java b/src/test/java/device/radioPlayer/RadioPlayerTest.java index dd49dce..225f0f6 100644 --- a/src/test/java/device/radioPlayer/RadioPlayerTest.java +++ b/src/test/java/device/radioPlayer/RadioPlayerTest.java @@ -198,7 +198,7 @@ class RadioPlayerTest { @MethodSource("saveStationOptions") void testSaveStation(String testName, RadioPlayer testRp,String testTyp, String expectedResult) { String savedStation; - if (testTyp == "normal") { + if (testTyp.equals("normal")) { savedStation = testRp.savedPlaylist.get(testRp.savedPlaylist.size() - 1);} else savedStation = Boolean.toString(testRp.regionPlaylist.isEmpty()); assertThat(savedStation).describedAs(testName).isEqualTo(expectedResult);