Skip to content

Conversation

@HelgeStenstrom
Copy link
Collaborator

Mockito is a mocking library used to create faked instances of classes. The class doesn't need to exist yet; we can create a mock from an interface or a parent class.

Mockito can also create spies, which intercept existing methods and check if and how they are called. The demonstration unit test uses spies.

Mockito has JUnit as a dependency. To avaoid JUnit version number conflict, we back the Junit version from 5.5.1 to 5.1.1, which is what this verison of Mockito wants.

HelgeStenstrom and others added 3 commits September 1, 2019 18:51
Generally, it's not recommended to throw Exception. See for example https://rules.sonarsource.com/java/RSPEC-112

In class StreamPlayer, new Exception is changed into new UnsupportedOperationException

As a consequence, StreamPlayerEventLauncher.call() no longer throws a checked exception. UnsupportedOperationException is an unchecked exception.
Mockito is a mocking library used to create faked instances of classes. The class doesn't need to exist yet; we can create a mock from an interface or a parent class.

Mockito can also create spies, which intercept existing methods and check if and how they are called. The demonstration unit test uses spies.

Mockito has JUnit as a dependency. To avaoid JUnit version number conflict, we back the Junit version from 5.5.1 to 5.1.1, which is what this verison of Mockito wants.
@goxr3plus
Copy link
Owner

I have been using Mockito yep its a great addition. I can not merge the pull requesta for some reason :'(

Mockito is a mocking library used to create faked instances of classes. The class doesn't need to exist yet; we can create a mock from an interface or a parent class.

Mockito can also create spies, which intercept existing methods and check if and how they are called. The demonstration unit test uses spies.

Mockito has JUnit as a dependency. To avaoid JUnit version number conflict, we back the Junit version from 5.5.1 to 5.1.1, which is what this verison of Mockito wants.
@HelgeStenstrom HelgeStenstrom merged commit dae3601 into goxr3plus:master Sep 2, 2019
@HelgeStenstrom
Copy link
Collaborator Author

I could ;)

@HelgeStenstrom HelgeStenstrom deleted the mockitoWithDemo branch September 2, 2019 05:44
@HelgeStenstrom
Copy link
Collaborator Author

I updated my local master (vs the remote) and then rebased this branch against the master. Maybe that’s why I didn’t have any merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants