RecordingAnalyticsClient

In-memory AnalyticsClient fake that records every call, for consumer unit tests.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
data class Increment(val property: String, val value: Double)

One recorded AnalyticsClient.increment call.

Link copied to clipboard
data class ScreenView(val name: String, val properties: Map<String, Any>)

One recorded AnalyticsClient.trackScreen call.

Properties

Link copied to clipboard
Link copied to clipboard

The token passed to the most recent initialize call, or null if never initialized.

Link copied to clipboard

Names of every tracked event, in order — the most common assertion in consumer tests.

Link copied to clipboard
Link copied to clipboard

Latest value of every user property set via setUserProperties.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun flush()
Link copied to clipboard
open override fun identify(userId: String)
Link copied to clipboard
open override fun increment(property: String, value: Double)
Link copied to clipboard
open override fun initialize(token: String, serverUrl: String?)
Link copied to clipboard
open override fun reset()
Link copied to clipboard
open override fun setUserProperties(properties: Map<String, Any>)
Link copied to clipboard
open override fun track(event: AnalyticsEvent)
Link copied to clipboard
open override fun trackScreen(name: String, properties: Map<String, Any>)