liato / android-bankdroid

A swedish banking application for your Android device.
http://www.swedroid.se/forum/showthread.php?t=11108
Other
242 stars 173 forks source link

Remove broken unit test #615

Closed walles closed 7 years ago

walles commented 7 years ago

This test fails on systems where the system locale is sv_SE.

Not sure what value this test adds, so I'm removing it.

goober commented 7 years ago

I agree with you. The PropertyResourceBundle should be mocked out to test that the expected property keys are mapped correctly.

walles commented 7 years ago

Depends on what the test wants to test.

If the test wants to test PropertyResourceBundle functionality it can't be mocked out, and neither can the ResourceBundles it returns.

But I'm fine either way, I can just run the unit tests with env LANG= ./gradlew test for now.

goober commented 7 years ago

I'll close this PR and will update the test cases to conform with how I intended it to work from the beginning. Thanks for the report.

walles commented 7 years ago

Makes sense, thanks @goober!

Also, because Android Studio doesn't properly handle test resources... https://code.google.com/p/android/issues/detail?id=64887 ... none of the FieldBuilderTests are runnable from within Android Studio.

Not sure if the tests can be adapted for that, and if they can't they can't, but it's something to keep in mind.

goober commented 7 years ago

Good catch and thanks for the link. I will try to add the suggested workaround as well. Or try to add idea configuration from within the build file to set Gradle as the default Test Runner