testing library

Offers additional features for OgHrefBuilder to run widget test.

Majority classes, fields and functions are annotated with visibleForTesting and should be avoided to use under production or release environment.

Classes

MetaFetchTester
Extended MetaFetch for performing testing purpose which replicates request and response actions in MockOgHrefClient since real network communication is forbidden during test (especially running in Flutter environments).
MockClient
A mock HTTP client designed for use when testing code that uses BaseClient.
MockOgHrefClient
Simulated environment based on MockClient that all generated content are specified by tester already.
MockUrlLauncherPlatform
Replication of UrlLauncherPlatform which replaces all interaction with calling browser features to MockClient.
Request
An HTTP request where the entire request body is known in advance.
Response
An HTTP response where the entire response body is known in advance.

Constants

deferPump → const Duration
The worse case scenrino Duration that the mock client will return response in Future.delayed.

Functions

setupMockInstances([MockClient mockClientConstructor()?]) → void
Attach UrlLauncherPlatform.instance to MockUrlLauncherPlatform with completed replication of MockClient and parsed as a Function for calling MockClient.new.

Typedefs

MockOgHrefClientConstructor = MockOgHrefClient Function()
A Function which returns new instance of MockOgHrefClient.