Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Needs more unit tests #46

Open
mooncat69 opened this issue Dec 1, 2020 · 3 comments
Open

Needs more unit tests #46

mooncat69 opened this issue Dec 1, 2020 · 3 comments

Comments

@mooncat69
Copy link

After a suggestion from the maintainer, I'm going to port my existing unit tests to the current codebase.

This may require a few tweaks to some constructors to allow me to create valid SongReader and VoicebankReader objects.

@titinko
Copy link
Owner

titinko commented Dec 2, 2020

UTSU was built to support the Mockito framework for unit tests. With some exceptions, dependencies are injected through the constructor so that Mockito can easily replace them. That said, I will happily accept unit tests that don't use this framework.

@mooncat69
Copy link
Author

I've pulled in the latest master branch and am trying to write unit tests against classes from the main java classes. I'm using Netbeans and can't get it to compile any of the unit tests referring to these classes. I presume this is due to exposure of the classes via the modules in the main project. Do you have any example of how this can work, please?

@titinko
Copy link
Owner

titinko commented Dec 6, 2020

Sorry for the trouble! I changed around the unit test build structure a few days ago since the way they worked before was hack-y and difficult to extend.

Unit testing in the modular world is a bit of a nightmare and IDEs sometimes don't know how to handle the module-info.test files. I use IntelliJ and was able to tell the IDE to build the module-info.test file directly. Regardless of the IDE, you should be able to run tests in the latest master branch by typing "mvn test" in your terminal.

Also as of a few days ago the project is using JUnit-Jupiter instead of the older JUnit/Truth libraries I was using before. So the imports would need to be a little different.

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

No branches or pull requests

2 participants