Abc | def |
---|---|
Abc | def |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- many chained calls --- | |
val presenter : LoginPresenter = spyk<LoginPresenter>() | |
val viewCallback = mockk<LoginContract.LoginViewCallBack>() | |
val cookieStore = mockk<PianoCookieStore>() | |
val loginRequest = LoginRequest("user", "pwd") | |
val customerResponse = CustomerResponse("j", "r") | |
every { presenter.accountDelegator.login(loginRequest) } returns Single.just(Response.success(any())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Entity( | |
val id: Int = 1, | |
val firstName: String = "John", | |
val lastName: String = "Smith", | |
val age: Int = 44 | |
) | |
every { | |
entity.copy( | |
firstName = "Sam", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
every { | |
route | |
.application | |
.attributes | |
.get(ApplicationFeature.registry) | |
.get(Locations.key) | |
} returns locations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- top level function --- | |
mockkStatic("pkg.FileKt") | |
every { topLevelFunctionInFileKt() } returns 5 | |
// --- Java static function --- | |
mockkStatic(Uri::class) | |
every { Uri.parse("http://test/path") } returns Uri("http", "test", "path") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Obj { | |
fun objectFn() = 5 | |
} | |
mockkObject(Obj) | |
every { Obj.objectFn() } returns 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Cls { | |
fun <T>genericFn(): T | |
fun otherFn(param: Int) = param + 1 | |
} | |
val mock = mockk<Cls>() | |
every { | |
mock.otherFn(mock.genericFn()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coEvery { mock.suspendFn() } returns 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Classfile /home/oleksiyp/workspace/playground-issue219/broken/Channel$Subclass0.class | |
Last modified Jan 26, 2019; size 5600 bytes | |
MD5 checksum 59659ef9d1918d11c3ee4ae1e4431de1 | |
public class kotlinx.coroutines.channels.Channel$Subclass0 implements kotlinx.coroutines.channels.Channel | |
minor version: 0 | |
major version: 54 | |
flags: (0x0021) ACC_PUBLIC, ACC_SUPER | |
this_class: #2 // kotlinx/coroutines/channels/Channel$Subclass0 | |
super_class: #4 // java/lang/Object | |
interfaces: 1, fields: 20, methods: 26, attributes: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"properties": { | |
"node": { | |
"properties": { | |
"id": { | |
"type": "string", | |
"description": "An opaque node identifier for the Envoy node. This also provides the local\n service node name. It should be set if any of the following features are\n used: :ref:`statsd \u003carch_overview_statistics\u003e`, :ref:`CDS\n \u003cconfig_cluster_manager_cds\u003e`, and :ref:`HTTP tracing\n \u003carch_overview_tracing\u003e`, either in this message or via\n :option:`--service-node`." | |
}, | |
"cluster": { |
OlderNewer