fix analysis

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2023-04-20 19:09:28 +05:30
committed by xsahil03x
parent 3b0cc225eb
commit 4d43b07df3
3 changed files with 20 additions and 19 deletions
@@ -3,8 +3,7 @@ import 'package:drift/drift.dart';
import 'package:stream_chat_persistence/src/converter/list_converter.dart';
import 'package:stream_chat_persistence/src/converter/map_converter.dart';
import 'package:stream_chat_persistence/src/converter/message_sending_status_converter.dart';
import 'channels.dart';
import 'package:stream_chat_persistence/src/entity/channels.dart';
/// Represents a [Messages] table in [MoorChatDatabase].
@DataClassName('MessageEntity')
@@ -17,14 +17,15 @@ void main() {
});
test(
'should throw type error if the provided json is not a list of String',
() {
final json = [22, 33, 44];
expect(
() => listConverter.fromSql(jsonEncode(json)),
throwsA(isA<TypeError>()),
);
});
'should throw type error if the provided json is not a list of String',
() {
final json = [22, 33, 44];
expect(
() => listConverter.fromSql(jsonEncode(json)),
throwsA(isA<TypeError>()),
);
},
);
test('should return list of String if json data list is provided', () {
final data = ['data1', 'data2', 'data3'];
@@ -60,14 +61,15 @@ void main() {
});
test(
'should throw type error if the provided json is not a list of String',
() {
final json = [22, 33, 44];
expect(
() => listConverter.fromSql(jsonEncode(json)),
throwsA(isA<TypeError>()),
);
});
'should throw type error if the provided json is not a list of String',
() {
final json = [22, 33, 44];
expect(
() => listConverter.fromSql(jsonEncode(json)),
throwsA(isA<TypeError>()),
);
},
);
test('should return list of String if json data list is provided', () {
final data = ['data1', 'data2', 'data3'];
@@ -5,7 +5,7 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:stream_chat_persistence/src/db/drift_chat_database.dart';
DatabaseConnection _backgroundConnection() =>
DatabaseConnection.fromExecutor(NativeDatabase.memory());
DatabaseConnection(NativeDatabase.memory());
void main() {
test(