SectionsTestHelper

open class SectionsTestHelper : Section

A helper for testing section components.

Allows testing a GroupsSectionSpec's direct children without building the whole hieararchy. Also allows simpler State updates testing by keeping trach of a scoped section context.

Constructors

Link copied to clipboard
constructor(c: Context)
constructor(base: SectionContext)

Functions

Link copied to clipboard
fun acceptTriggerEvent(eventTrigger: EventTrigger, eventState: Any, params: Array<Any>): Any
Link copied to clipboard
open fun dispatchEvent(section: HasEventDispatcher, eventHandler: EventHandler, event: Any): Any
Dispatches an event to the section
Link copied to clipboard
open fun dispatchLoadingEvent(context: SectionContext, isEmpty: Boolean, loadingState: LoadingEvent.LoadingState, t: Throwable)
Link copied to clipboard
fun dispatchOnEvent(eventHandler: EventHandler, eventState: Any): Any
Link copied to clipboard
open fun generateUniqueGlobalKeyForChild(section: Section, childKey: String): String
Link copied to clipboard
open fun getChildren(): List<Section>

open fun getChildren(section: Section): List<SubSection>
Get child sections for the given section.
Link copied to clipboard
open fun getContext(): SectionContext
Return a generic SectionContext you can use to create sections.
Link copied to clipboard
Link copied to clipboard
open fun getGlobalKey(): String
Link copied to clipboard
open fun getLoadingEventHandler(context: SectionContext): EventHandler
Link copied to clipboard
open fun getLogTag(): String
Link copied to clipboard
open fun getParent(): Section
Link copied to clipboard
open fun getScopedContext(): SectionContext

open fun getScopedContext(s: Section): SectionContext
Return the specific SectionContext that's been scoped to the given section.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun <T : StateContainer?> getStateContainer(section: Section): T
Get the state container of the given section.
Link copied to clipboard
open fun getSubSections(children: Children): List<SubSection>
Get sub sections for the given Children.
Link copied to clipboard
Link copied to clipboard
open fun isEquivalentTo(other: Section): Boolean
Link copied to clipboard
open fun isSectionIndexValid(c: SectionContext, keyString: String, index: Int): Boolean
Link copied to clipboard
open fun makeShallowCopy(deepCopy: Boolean): Section
Link copied to clipboard
open fun prepare(s: Section): Section
Prepare section for testing.
Link copied to clipboard
Link copied to clipboard
open fun requestFocus(c: SectionContext, index: Int)
Link copied to clipboard
open fun requestFocusWithOffset(c: SectionContext, index: Int, offset: Int)
Link copied to clipboard
open fun requestSmoothFocus(c: SectionContext, index: Int)
Link copied to clipboard
open fun setChildren(children: Children)
Link copied to clipboard
open fun setCount(count: Int)
Link copied to clipboard
open fun setGlobalKey(key: String)
Link copied to clipboard
open fun setKey(key: String)
Link copied to clipboard
open fun setScopedContext(scopedContext: SectionContext)
Link copied to clipboard
open fun toString(): String