From 4d43b07df3d875fc6be99c34955856cca3e8007f Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Thu, 20 Apr 2023 19:09:28 +0530 Subject: [PATCH] fix analysis Signed-off-by: xsahil03x --- .../lib/src/entity/messages.dart | 3 +- .../src/converter/list_coverter_test.dart | 34 ++++++++++--------- .../test/src/db/drift_chat_database_test.dart | 2 +- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/packages/stream_chat_persistence/lib/src/entity/messages.dart b/packages/stream_chat_persistence/lib/src/entity/messages.dart index 2bbb29e5..fe20013a 100644 --- a/packages/stream_chat_persistence/lib/src/entity/messages.dart +++ b/packages/stream_chat_persistence/lib/src/entity/messages.dart @@ -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') diff --git a/packages/stream_chat_persistence/test/src/converter/list_coverter_test.dart b/packages/stream_chat_persistence/test/src/converter/list_coverter_test.dart index ebd1d520..05c79102 100644 --- a/packages/stream_chat_persistence/test/src/converter/list_coverter_test.dart +++ b/packages/stream_chat_persistence/test/src/converter/list_coverter_test.dart @@ -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()), - ); - }); + '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()), + ); + }, + ); 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()), - ); - }); + '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()), + ); + }, + ); test('should return list of String if json data list is provided', () { final data = ['data1', 'data2', 'data3']; diff --git a/packages/stream_chat_persistence/test/src/db/drift_chat_database_test.dart b/packages/stream_chat_persistence/test/src/db/drift_chat_database_test.dart index 0528d5c5..996c152f 100644 --- a/packages/stream_chat_persistence/test/src/db/drift_chat_database_test.dart +++ b/packages/stream_chat_persistence/test/src/db/drift_chat_database_test.dart @@ -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(