fluent_assertions 0.1.0 copy "fluent_assertions: ^0.1.0" to clipboard
fluent_assertions: ^0.1.0 copied to clipboard

outdated

Fluent Assertions library written in Dart.

The Fluent Assertions library written in Dart.

It uses Dart's Extension Functions to provide a fluent wrapper around test assertions.

Usage #

Basic Assertions

These assertions are available for all objects.

Equality
'Hello'.shouldBeEqualTo('Hello');
'Hello'.shouldNotBeEqualTo('Word');
Reference equality
final me = Person(name: 'Karol');
final alsoMe = Person(name: 'Karol');
me.shouldBe(me);
me.shouldNotBe(alsoMe);
Subtypes
const num numberOfGirlsIAttract = 0;
numberOfGirlsIAttract.shouldBeInstanceOf<int>();
numberOfGirlsIAttract.shouldNotBeInstanceOf<double>();
Nullability
const hello = 'Hello';
hello.shouldNotBeNull();
const hello = null;
hello.shouldBeNull();
Booleans
const hasChildren = true;
hasChildren.shouldBeTrue();
hasChildren.shouldNotBeFalse();
const hasChildren = false;
hasChildren.shouldBeFalse();
hasChildren.shouldNotBeTrue();

Numerical Assertions

CharSequence Assertions

Collection Assertions

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Author #

4
likes
0
pub points
44%
popularity

Publisher

verified publisherklisiewicz.dev

Fluent Assertions library written in Dart.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

test

More

Packages that depend on fluent_assertions