Update test case

This commit is contained in:
thomashii@dukefirehawk.com 2021-05-05 23:38:05 +08:00
parent 370df62fb6
commit 291c852f65

View file

@ -332,14 +332,18 @@ class RoleUserQuery extends Query<RoleUser, RoleUserQueryWhere> {
}
var model = RoleUser();
if (row.length > 2) {
model = model.copyWith(
role: RoleQuery.parseRow(row.skip(2).take(4).toList()).value);
var roleOpt = RoleQuery.parseRow(row.skip(2).take(4).toList());
roleOpt.ifPresent((role) {
model = model.copyWith(role: role);
});
}
if (row.length > 6) {
model = model.copyWith(
user: UserQuery.parseRow(row.skip(6).take(6).toList()).value);
var userOpt = UserQuery.parseRow(row.skip(6).take(6).toList());
userOpt.ifPresent((user) {
model = model.copyWith(user: user);
});
}
return Optional.ofNullable(model);
return Optional.of(model);
}
@override