test_track_test_support

Creator: coderz1093

Last updated:

0 purchases

test_track_test_support Image
test_track_test_support Images

Languages

Categories

Add to Cart

Description:

test track test support

TestTrack Test Support #
This is the testing support package intended to facilitate easy integration testing with the TestTrack dart client.
FakeTestTrack #
The most useful utility offered by this package is FakeTestTrack. This is a TestTrack instance that has the same API as the production implementation, but doesn't talk to your backend. Instead, it supports configuring the desired split configurations so you can test how your application responds.
/// Creates a TestTrack instance where
/// all Abs return true
final testTrack = FakeTestTrack(
ab: (_, __, ___) => true;
);

/// Creates a TestTrack instance where
/// all Varys return true
final testTrack = FakeTestTrack(
vary: (_, __, ___) => true;
);
copied to clipboard
If you don't want to specify how the FakeTestTrack should respond, you can rely on its sane defaults.
Factories #
This package also providers factories for use in tests.
final visitor = VisitorFactory.build().withAssignments(...);
final splitRegistry = SplitRegistryFactory.build();

final testTrack = FakeTestTrack(
visitor: visitor,
splitRegistry: splitRegistry,
);
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.