mockExec method
void
mockExec({})
inherited
Makes exec
successful or not
Implementation
void mockExec({
required T result,
GgLog? ggLog,
Directory? directory,
bool doThrow = false,
String? message,
}) {
when(
() => exec(
directory: any(
named: 'directory',
that: predicate<Directory>(
(d) => directory == null || d.path == directory.path,
),
),
ggLog: ggLog ?? any(named: 'ggLog'),
),
).thenAnswer((invocation) async {
return defaultReaction(
doThrow: doThrow,
invocation: invocation,
result: result,
message: message,
);
});
}