Skip to content

Observers constructor for tests #167

@hermanbanken

Description

@hermanbanken

Looking at examples/src/test/scala/rx/lang/scala/examples/TestSchedulerExample.scala I figured I could create my Observer like this:

val observer = mock(classOf[rx.Observer[Long]])
val obs: rx.lang.scala.Observer = Observer(new rx.observers.TestObserver(observer))

But it seems that this is not the case as this apply method is private.

Are we supposed to not write tests? Or am I missing something?

PS: The documentation for TestScheduler published at reactivex.io shows the same example, which uses more unknown things like inOrder with a single argument. If I take an up to date Mockito version, this method does have multiple arguments... would be helpful to either fix this or document the version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions