isUseCaseExecutionEntry<C extends UseCaseCommand> function
Matcher
isUseCaseExecutionEntry<C extends UseCaseCommand>({
- Object? command = _unspecified,
- Object? id = _unspecified,
- UseCaseExecutionPhase? phase,
- Object? result = _unspecified,
- Object? groupKey = _unspecified,
- Object? reason = _unspecified,
- Object? instructions = _unspecified,
- Object? createdAt = _unspecified,
- Object? queuedAt = _unspecified,
- Object? startedAt = _unspecified,
- Object? finishedAt = _unspecified,
Matches an execution entry whose command has exact Dart type C.
Implementation
test.Matcher isUseCaseExecutionEntry<C extends UseCaseCommand>({
final Object? command = _unspecified,
final Object? id = _unspecified,
final UseCaseExecutionPhase? phase,
final Object? result = _unspecified,
final Object? groupKey = _unspecified,
final Object? reason = _unspecified,
final Object? instructions = _unspecified,
final Object? createdAt = _unspecified,
final Object? queuedAt = _unspecified,
final Object? startedAt = _unspecified,
final Object? finishedAt = _unspecified,
}) {
test.TypeMatcher<UseCaseExecutionEntry<UseCaseCommand>> matcher = test
.isA<UseCaseExecutionEntry<UseCaseCommand>>()
.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.command,
'command type',
test.isA<C>(),
);
if (!identical(command, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.command,
'command',
command,
);
}
if (!identical(id, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.id,
'id',
id,
);
}
if (phase != null) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.phase,
'phase',
phase,
);
}
if (!identical(result, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.result,
'result',
result,
);
}
if (!identical(groupKey, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.groupKey,
'groupKey',
groupKey,
);
}
if (!identical(reason, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.reason,
'reason',
reason,
);
}
if (!identical(instructions, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.instructions,
'instructions',
instructions,
);
}
if (!identical(createdAt, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.createdAt,
'createdAt',
createdAt,
);
}
if (!identical(queuedAt, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.queuedAt,
'queuedAt',
queuedAt,
);
}
if (!identical(startedAt, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.startedAt,
'startedAt',
startedAt,
);
}
if (!identical(finishedAt, _unspecified)) {
matcher = matcher.having(
(final UseCaseExecutionEntry<UseCaseCommand> value) => value.finishedAt,
'finishedAt',
finishedAt,
);
}
return matcher;
}