Robin Richtsfeld
2017-12-01 16:25:15 UTC
Google Code-In Task: https://codein.withgoogle.com/tasks/5400418718842880/
GitHub
Issue: https://github.com/jboss-outreach/compressor-head-android/issues/16
The objective is to write tests
for https://github.com/jboss-outreach/compressor-head-android/blob/master/app/src/main/java/com/community/jboss/compressorhead/utils/CompressorHead.java
using JUnit.
The problem is that some of the code to be tested is not mocked, which
gives the following error when running the with JUnit:
Method scheme in android.net.Uri$Builder not mocked. See
http://g.co/androidstudio/not-mocked for details.
The android.jar file that is used to run unit tests does not contain any
actual code - that is provided by the Android system image on real devices.
Instead, all methods throw exceptions (by default). This is to make sure
your unit tests only test your code and do not depend on any particular
behaviour of the Android platform (that you have not explicitly mocked e.g.
using Mockito).
Although, everything works when calling the tests from the Activity, I
expect the automated JUnit testing to fail.
GitHub
Issue: https://github.com/jboss-outreach/compressor-head-android/issues/16
The objective is to write tests
for https://github.com/jboss-outreach/compressor-head-android/blob/master/app/src/main/java/com/community/jboss/compressorhead/utils/CompressorHead.java
using JUnit.
The problem is that some of the code to be tested is not mocked, which
gives the following error when running the with JUnit:
Method scheme in android.net.Uri$Builder not mocked. See
http://g.co/androidstudio/not-mocked for details.
The android.jar file that is used to run unit tests does not contain any
actual code - that is provided by the Android system image on real devices.
Instead, all methods throw exceptions (by default). This is to make sure
your unit tests only test your code and do not depend on any particular
behaviour of the Android platform (that you have not explicitly mocked e.g.
using Mockito).
Although, everything works when calling the tests from the Activity, I
expect the automated JUnit testing to fail.
--
You received this message because you are subscribed to the Google Groups "Google Code-in Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gci-discuss+***@googlegroups.com.
To post to this group, send email to gci-***@googlegroups.com.
Visit this group at https://groups.google.com/group/gci-discuss.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Google Code-in Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gci-discuss+***@googlegroups.com.
To post to this group, send email to gci-***@googlegroups.com.
Visit this group at https://groups.google.com/group/gci-discuss.
For more options, visit https://groups.google.com/d/optout.