From 97d95c37154461c29c8fedfd55d640dbfaaf6697 Mon Sep 17 00:00:00 2001 From: Anindya Chatterjee Date: Sun, 29 Sep 2024 07:56:03 +0530 Subject: [PATCH] test cases fixed --- packages/nitrite/test/collection/document_test.dart | 11 ++++------- .../test/integration/repository/search_test.dart | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/nitrite/test/collection/document_test.dart b/packages/nitrite/test/collection/document_test.dart index e44fc94..94a0d47 100644 --- a/packages/nitrite/test/collection/document_test.dart +++ b/packages/nitrite/test/collection/document_test.dart @@ -74,8 +74,8 @@ void main() { ..put("line1", "40") ..put("line2", "ABC Street"))); expect(doc["location.address.test"], isNot("a")); - expect(doc["."], isNull); - expect(doc[".."], isNull); + expect(() => doc["."], throwsValidationException); + expect(() => doc[".."], throwsValidationException); expect(doc["score.test"], isNull); }); @@ -118,8 +118,8 @@ void main() { ..put("line1", "40") ..put("line2", "ABC Street"))); expect(doc["location:address:test"], isNot("a")); - expect(doc[":"], isNull); - expect(doc["::"], isNull); + expect(() => doc[":"], throwsValidationException); + expect(() => doc["::"], throwsValidationException); expect(doc["score:test"], isNull); expect(doc["location.address.line1"], isNull); @@ -180,9 +180,6 @@ void main() { ..put("line1", "40") ..put("line2", "ABC Street"))); expect(doc["location.address.test"], isNot("a")); - expect(doc["."], isNull); - expect(doc[".."], isNull); - expect(doc["score.test"], isNull); }); test("Put NULL", () { diff --git a/packages/nitrite/test/integration/repository/search_test.dart b/packages/nitrite/test/integration/repository/search_test.dart index 0dc6900..dd2de00 100644 --- a/packages/nitrite/test/integration/repository/search_test.dart +++ b/packages/nitrite/test/integration/repository/search_test.dart @@ -270,7 +270,7 @@ void main() { expect(await cursor.length, 10); }); - test('Test Text Filter', () async { + test('Test Text Filter', retry: 3, () async { var cursor = employeeRepository.find(); var emp = await cursor.first; var text = emp.employeeNote?.text as String;