Skip to content

NetworkServiceMock where responses can be defined before they are consumed #103

Open
@ch-one

Description

In some situations it would be helpful to have a NetworkServiceMock where mocked responses can be defined before they are consumed.

Having an additional mock would bring the following benefits:

  • Separation of mock setup and test code
  • Response definition can be located in one place (in the beginning of the test method or in setUp method) and is not scattered
  • Cases where it is not clear, when the network call will happen are no longer a problem
  • Freedom of choice: Current NetworkServiceMock is still available

In addition the possibility to define a timing behaviour may be interesting. Something like:

  • Immediately
  • Delayed (by amount of time)

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