mocktailx 0.0.1 copy "mocktailx: ^0.0.1" to clipboard
mocktailx: ^0.0.1 copied to clipboard

outdated

A set of utility functions over mocktail library.

mocktailx #

A set of utility functions for mocktail apis.

Usage #

First import mocktailx to your pubspec:

mocktailx: ^0.0.1  

Note that this library is a container for mocktail, so you don't need to import mocktail.
And don't forget to fix your imports:

import 'package:mocktailx/mocktailx.dart';  

Features #

thenAnswerWithVoid

// Instead of doing:  
when(repo.futureVoidFunction).thenAnswer((invocation) async {});  
// You can just:  
when(repo.futureVoidFunction).thenAnswerWithVoid();   

thenAnswerWith(T)

// Instead of doing:  
when(repo.futureIntFunction).thenAnswer((invocation) async => 10);  
// You can just:  
when(repo.futureIntFunction).thenAnswerWith(10);  

thenEmit(List

// Instead of doing:  
when(repo.streamValue).thenAnswer((invocation) => Stream.fromIterable([1,2,3,4,5]));  
// You can just:  
when(repo.streamValue).thenEmit([1,2,3,4,5]);  
11
likes
0
pub points
36%
popularity

Publisher

unverified uploader

A set of utility functions over mocktail library.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

mocktail

More

Packages that depend on mocktailx