Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tshedor committed May 27, 2024
1 parent f5c252b commit 1a1b348
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ class OfflineFirstSqliteSerialize extends SqliteSerialize {
}

@override
String uniqueValueForField(annotatedName, {required checker}) {
String uniqueValueForField(fieldName, {required checker}) {
if ((checker as OfflineFirstChecker).hasSerdes) {
return '$annotatedName.toSqlite()';
return '$fieldName.toSqlite()';
}

return super.uniqueValueForField(annotatedName, checker: checker);
return super.uniqueValueForField(fieldName, checker: checker);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void main() {

test('OfflineFirstSerdesWithTypeArgument', () async {
await generateAdapterExpectation(
'offlne_first_serdes_with_type_argument',
'offline_first_serdes_with_type_argument',
offlineFirstSerdesWithTypeArgument.output,
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class SqliteSerialize<_Model extends SqliteModel> extends SqliteSerdesGenerator<
type: $columnInsertionType,
)''');
if (annotation.unique) {
final value = uniqueValueForField(annotation.name, checker: checker);
final value = uniqueValueForField(field.name, checker: checker);
uniqueFields[value] = columnName;
}
}
Expand Down Expand Up @@ -345,8 +345,8 @@ class SqliteSerialize<_Model extends SqliteModel> extends SqliteSerdesGenerator<
/// confuse maintenance. A string or int or double is more than sufficient to determine
/// a row's uniqueness.
@protected
String uniqueValueForField(String? annotatedName, {required SharedChecker checker}) {
return annotatedName ?? '';
String uniqueValueForField(String? fieldName, {required SharedChecker checker}) {
return fieldName ?? '';
}
}

Expand Down

0 comments on commit 1a1b348

Please sign in to comment.