Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

FakeKeyedAppStatesReporter

open class FakeKeyedAppStatesReporter : KeyedAppStatesReporter
kotlin.Any
   ↳ androidx.enterprise.feedback.KeyedAppStatesReporter
   ↳ androidx.enterprise.feedback.FakeKeyedAppStatesReporter

A fake KeyedAppStatesReporter for testing.

Example usage:

<code>FakeKeyedAppStatesReporter reporter = new FakeKeyedAppStatesReporter();
    // Inject the reporter to the part of your code it will be used.
    assertThat(reporter.getKeyedAppStatesByKey().get("myKey").getMessage()).isEqualTo("expected");
  </code>

Summary

Public constructors

A fake KeyedAppStatesReporter for testing.

Public methods
open MutableList<KeyedAppState!>

Get a list of all KeyedAppState instances that have been set.

open MutableMap<String!, KeyedAppState!>

Get a map of the latest KeyedAppState set for each key.

open Int

Get the number of times setStatesImmediate(Collection) has been called.

open MutableList<KeyedAppState!>

Get a list of KeyedAppState instances that have been set but not yet uploaded.

open MutableMap<String!, KeyedAppState!>

Get a map of the latest KeyedAppState set for each key that has not yet uploaded.

open MutableList<KeyedAppState!>

Get a list of KeyedAppState instances that have been set and uploaded.

open MutableMap<String!, KeyedAppState!>

Get a list of the latest KeyedAppState set for each key that has been uploaded.

open Unit

open Unit
setStates(@NonNull states: MutableCollection<KeyedAppState!>, @Nullable callback: KeyedAppStatesCallback?)

Record the states set.

open Unit

open Unit
setStatesImmediate(@NonNull states: MutableCollection<KeyedAppState!>, @Nullable callback: KeyedAppStatesCallback?)

Record the set states and immediately mark all states as having been uploaded.

Inherited functions

Public constructors

<init>

FakeKeyedAppStatesReporter()

A fake KeyedAppStatesReporter for testing.

Example usage:

<code>FakeKeyedAppStatesReporter reporter = new FakeKeyedAppStatesReporter();
    // Inject the reporter to the part of your code it will be used.
    assertThat(reporter.getKeyedAppStatesByKey().get("myKey").getMessage()).isEqualTo("expected");
  </code>

Public methods

getKeyedAppStates

@NonNull open fun getKeyedAppStates(): MutableList<KeyedAppState!>

Get a list of all KeyedAppState instances that have been set.

This is in the order that they were set, and may contain multiple with the same key, if that key has been set twice.

getKeyedAppStatesByKey

@NonNull open fun getKeyedAppStatesByKey(): MutableMap<String!, KeyedAppState!>

Get a map of the latest KeyedAppState set for each key.

getNumberOfUploads

open fun