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(); var model = RoleUser();
if (row.length > 2) { if (row.length > 2) {
model = model.copyWith( var roleOpt = RoleQuery.parseRow(row.skip(2).take(4).toList());
role: RoleQuery.parseRow(row.skip(2).take(4).toList()).value); roleOpt.ifPresent((role) {
model = model.copyWith(role: role);
});
} }
if (row.length > 6) { if (row.length > 6) {
model = model.copyWith( var userOpt = UserQuery.parseRow(row.skip(6).take(6).toList());
user: UserQuery.parseRow(row.skip(6).take(6).toList()).value); userOpt.ifPresent((user) {
model = model.copyWith(user: user);
});
} }
return Optional.ofNullable(model); return Optional.of(model);
} }
@override @override