simon.vergauwen
09/13/2016, 9:16 AMsimon.vergauwen
09/13/2016, 9:16 AMraniejade
09/13/2016, 9:16 AMsimon.vergauwen
09/13/2016, 9:17 AMsimon.vergauwen
09/13/2016, 6:55 PMsimon.vergauwen
09/13/2016, 6:56 PMreset(mock)
will only work in a beforeEach
because (???)simon.vergauwen
09/13/2016, 6:57 PMgiven("A correct email adres") {
beforeEach{ reset(mainView) }
listOf("<mailto:test@appfoundry.be|test@appfoundry.be>", "<mailto:ttest@fffff.org|ttest@fffff.org>", "<mailto:bbbb@bbbbb.com|bbbb@bbbbb.com>").forEach {
it("$it should be shown as email") {
mainPresenter.processText(it)
verify(mainView, times(1)).showItem(any<Item>())
}
}
}
simon.vergauwen
09/13/2016, 6:58 PMsimon.vergauwen
09/13/2016, 6:58 PMgiven("A correct email adres") {
listOf("<mailto:test@appfoundry.be|test@appfoundry.be>", "<mailto:ttest@fffff.org|ttest@fffff.org>", "<mailto:bbbb@bbbbb.com|bbbb@bbbbb.com>").forEach {
reset(mainView)
it("$it should be shown as email") {
mainPresenter.processText(it)
verify(mainView, times(1)).showItem(any<Item>())
}
}
}
simon.vergauwen
09/13/2016, 6:59 PMMOCKITO_CORE
and those changes normally only take affect before or after a test.nstewart
09/14/2016, 12:07 AM./gradlew build
and getting this stacktrace: INFO: Discovered TestEngines with IDs: [spek]
Exception in thread "main" java.lang.NoClassDefFoundError: org/jetbrains/spek/api/DescribeBody
> Buildiat org.jetbrains.spek.samples.AfterEachInDescribeTest$1.invoke(AfterEachInDescribeTest.kt:6)
at org.jetbrains.spek.engine.SpekTestEngine.resolveSpec(SpekTestEngine.kt:108)
at org.jetbrains.spek.engine.SpekTestEngine.resolveSpecs(SpekTestEngine.kt:50)
at org.jetbrains.spek.engine.SpekTestEngine.discover(SpekTestEngine.kt:36)
at org.junit.platform.launcher.core.DefaultLauncher.discoverRoot(DefaultLauncher.java:108)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:84)
at org.junit.platform.console.tasks.ExecuteTestsTask.executeTests(ExecuteTestsTask.java:60)
at org.junit.platform.console.tasks.ExecuteTestsTask.lambda$execute$0(ExecuteTestsTask.java:52)
at org.junit.platform.console.tasks.CustomContextClassLoaderExecutor.invoke(CustomContextClassLoaderExecutor.java:33)
at org.junit.platform.console.tasks.ExecuteTestsTask.execute(ExecuteTestsTask.java:52)
at org.junit.platform.console.tasks.ConsoleTaskExecutor.executeTask(ConsoleTaskExecutor.java:38)
at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:54)
at org.junit.platform.console.ConsoleLauncher.main(ConsoleLauncher.java:39)
Caused by: java.lang.ClassNotFoundException: org.jetbrains.spek.api.DescribeBody
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more
:spek-samples:junitPlatformTest FAILED
raniejade
09/14/2016, 4:48 AMraniejade
09/14/2016, 4:51 AMsimon.vergauwen
09/14/2016, 5:32 AMreset(mainView)
is executed in the discovery phase. And thus it doesn’t take effect.simon.vergauwen
09/14/2016, 5:32 AMnstewart
09/14/2016, 12:05 PMConsoleRunner
so that I can run tests from the commandline (I’m unable to use Gradle currently).raniejade
09/14/2016, 1:13 PMnstewart
09/14/2016, 1:13 PMe71dc9f
, from 5 days agonstewart
09/14/2016, 3:08 PMjohn.shelley
09/14/2016, 6:17 PMcontext(“My context A”)
and updated it to context(“My context B”)
but it didn’t update in the Run panel.adambl4
09/14/2016, 6:19 PMassemble
task to Before launch
list?adambl4
09/14/2016, 6:20 PMFor Android Studio, you need to add a Before launch gradle step to compile your test classes. If you have the default setup, adding assembleDebugUnitTest should suffice.
john.shelley
09/14/2016, 6:21 PMadambl4
09/14/2016, 6:21 PMjohn.shelley
09/14/2016, 6:28 PMcedric
09/14/2016, 6:39 PMjohn.shelley
09/14/2016, 6:44 PMcontext
block isn’t updating in Studio but the it
block is.adambl4
09/14/2016, 8:03 PMadambl4
09/14/2016, 8:06 PMSpekRunConfiguration
to TestNGConfiguration
. It adds Gradle-aware make
step to before launch
list, but this step executes nothingadambl4
09/14/2016, 8:06 PMJUnitConfiguration