Skip to content

Commit

Permalink
Changed event source from Object to StreamPlayer. (#43)
Browse files Browse the repository at this point in the history
Changed event source from Object to StreamPlayer.
  • Loading branch information
goxr3plus committed Sep 17, 2019
2 parents cbc3bf1 + 50f349d commit d32a46a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class StreamPlayerEvent {
private int encodedStreamPosition = -1;

/** The source. */
private Object source = null;
private StreamPlayer source = null;

/** The description. */
private Object description = null;
Expand All @@ -55,7 +55,7 @@ public class StreamPlayerEvent {
* @param description
* the description
*/
public StreamPlayerEvent(Object source, Status status, int encodededStreamPosition, Object description) {
public StreamPlayerEvent(StreamPlayer source, Status status, int encodededStreamPosition, Object description) {
this.source = source;
this.playerStatus = status;
this.encodedStreamPosition = encodededStreamPosition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class StreamPlayerEventLauncher implements Callable<String> {
private List<StreamPlayerListener> listeners = null;

/** The source. */
private Object source = null;
private StreamPlayer source = null;

/**
* Instantiates a new stream player event launcher.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import com.goxr3plus.streamplayer.enums.Status;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.configuration.IMockitoConfiguration;

import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.mock;

class StreamPlayerEventTest {

private Object source;
private StreamPlayer source;
private Object description;
private Status status;
private int encodededStreamPosition;
Expand All @@ -17,7 +19,7 @@ class StreamPlayerEventTest {
@BeforeEach
void setUp() {
description = new Object();
source = new Object();
source = mock(StreamPlayer.class);
status = Status.RESUMED;
encodededStreamPosition = 12345;
event = new StreamPlayerEvent(source, status, encodededStreamPosition, description);
Expand Down

0 comments on commit d32a46a

Please sign in to comment.