mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
26 lines
601 B
Dart
26 lines
601 B
Dart
import 'package:nc_photos/object_extension.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
group("ObjectExtension", () {
|
|
test("apply", () {
|
|
const obj = Object();
|
|
expect(obj.apply((obj) => 1), obj);
|
|
});
|
|
|
|
test("applyFuture", () async {
|
|
const obj = Object();
|
|
expect(await obj.applyFuture((obj) async => 1), obj);
|
|
});
|
|
|
|
test("run", () {
|
|
const obj = Object();
|
|
expect(obj.run((obj) => 1), 1);
|
|
});
|
|
|
|
test("runFuture", () async {
|
|
const obj = Object();
|
|
expect(await obj.runFuture((obj) => Future.value(1)), 1);
|
|
});
|
|
});
|
|
}
|