raniejade
07/04/2016, 2:59 PMassertBucketWasAddedInList(testListSubscriber)
dmitriy.m
07/04/2016, 3:04 PMjasper
07/05/2016, 6:50 AMjasper
07/05/2016, 6:55 AMdmitriy.m
07/05/2016, 7:03 AMSpek
and PowerMock
, especially for mocking static methods.nhaarman
07/05/2016, 7:07 AMdmitriy.m
07/05/2016, 7:08 AMchristophsturm
07/05/2016, 8:29 AMdmitriy.m
07/05/2016, 8:30 AMdmitriy.m
07/05/2016, 8:31 AMchristophsturm
07/05/2016, 8:32 AMchristophsturm
07/05/2016, 8:32 AMdmitriy.m
07/05/2016, 8:33 AMdmitriy.m
07/05/2016, 12:22 PMSpek
with PowerMock
? how to connect one with another?artem_zin
07/05/2016, 12:28 PMPowerMock
supports delegation to other runners, so you can try to run tests with PowerMockRunner
and delegate execution to JUnitSpekRunner
https://www.jayway.com/2014/11/29/using-another-junit-runner-with-powermock/artem_zin
07/05/2016, 12:29 PMPowerMock
, it’s a sign of bad design if you need it 🙂dmitriy.m
07/05/2016, 12:31 PMyole
07/05/2016, 12:33 PMdmitriy.m
07/05/2016, 12:36 PMjasper
07/06/2016, 5:47 AM[[expectFutureValue(receivedContext) shouldEventuallyBeforeTimingOutAfter(5.0)] beNonNil];
<— Very wordy Objective-C
I tried my own waitFor (condition) { //do something}
but got:
Method getMainLooper in android.os.Looper not mocked. See <http://g.co/androidstudio/not-mocked> for details.
jasper
07/06/2016, 5:51 AMartem_zin
07/06/2016, 7:59 AMMethod getMainLooper in android.os.Looper not mocked.
means that you’re trying to use class (in particular Looper
) from Android SDK during jvm tests, Android Gradle Plugin creates mocked
jar of Android SDK classes without implementation.
It’s not related to Spek and there are several solutions:
* Don’t touch Android SDK classes in jvm tests
* Use Robolectric
* Write test as instrumentation test to run it on device/emulator instead of jvmjasper
07/06/2016, 8:38 AMartem_zin
07/06/2016, 8:40 AMapk
and connect device/emulator during local development. JVM tests run in seconds, instrumentation takes * x times
longerrepa40x
07/06/2016, 10:22 AMraniejade
07/10/2016, 11:50 AMmichele
07/11/2016, 6:48 AMhhariri
hoang
07/11/2016, 11:01 AM@RunWith(JUnitPlatform::class)
on each of the Test case (and testCompile 'org.junit.platform:junit-platform-runner:+'
in build.gradle of that module)hoang
07/11/2016, 11:02 AM