fix analyse
parent
ca89535612
commit
879eb071e9
65
pubspec.lock
65
pubspec.lock
|
@ -93,14 +93,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: collection
|
name: collection
|
||||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
<<<<<<< HEAD
|
|
||||||
version: "1.17.2"
|
version: "1.17.2"
|
||||||
=======
|
|
||||||
version: "1.18.0"
|
|
||||||
>>>>>>> bb189b31687f0d63efe9893fe4802b9d7f39782d
|
|
||||||
convert:
|
convert:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -156,11 +152,7 @@ packages:
|
||||||
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
|
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
<<<<<<< HEAD
|
|
||||||
version: "7.0.0"
|
|
||||||
=======
|
|
||||||
version: "6.1.4"
|
version: "6.1.4"
|
||||||
>>>>>>> bb189b31687f0d63efe9893fe4802b9d7f39782d
|
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -197,14 +189,11 @@ packages:
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
fuchsia_remote_debug_protocol:
|
fuchsia_remote_debug_protocol:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
source: sdk
|
source: sdk
|
||||||
version: "0.0.0"
|
version: "0.0.0"
|
||||||
>>>>>>> bb189b31687f0d63efe9893fe4802b9d7f39782d
|
|
||||||
glob:
|
glob:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -270,14 +259,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
<<<<<<< HEAD
|
|
||||||
version: "1.9.1"
|
version: "1.9.1"
|
||||||
=======
|
|
||||||
version: "1.10.0"
|
|
||||||
>>>>>>> bb189b31687f0d63efe9893fe4802b9d7f39782d
|
|
||||||
mockito:
|
mockito:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
|
@ -330,17 +315,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: platform
|
name: platform
|
||||||
<<<<<<< HEAD
|
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
|
||||||
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
|
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.4"
|
version: "3.1.0"
|
||||||
=======
|
|
||||||
sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.1.2"
|
|
||||||
>>>>>>> bb189b31687f0d63efe9893fe4802b9d7f39782d
|
|
||||||
plugin_platform_interface:
|
plugin_platform_interface:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -348,10 +326,7 @@ packages:
|
||||||
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
<<<<<<< HEAD
|
|
||||||
version: "2.1.8"
|
version: "2.1.8"
|
||||||
=======
|
|
||||||
version: "2.1.7"
|
|
||||||
process:
|
process:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -360,7 +335,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.2.4"
|
version: "4.2.4"
|
||||||
>>>>>>> bb189b31687f0d63efe9893fe4802b9d7f39782d
|
|
||||||
pub_semver:
|
pub_semver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -450,18 +424,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stack_trace
|
name: stack_trace
|
||||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.11.1"
|
version: "1.11.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: stream_channel
|
name: stream_channel
|
||||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.2"
|
version: "2.1.1"
|
||||||
string_scanner:
|
string_scanner:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -490,14 +464,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
|
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
<<<<<<< HEAD
|
|
||||||
version: "0.6.0"
|
version: "0.6.0"
|
||||||
=======
|
|
||||||
version: "0.6.1"
|
|
||||||
>>>>>>> bb189b31687f0d63efe9893fe4802b9d7f39782d
|
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -578,17 +548,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.4"
|
version: "2.1.4"
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
vm_service:
|
vm_service:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583
|
sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "11.10.0"
|
version: "11.7.1"
|
||||||
>>>>>>> bb189b31687f0d63efe9893fe4802b9d7f39782d
|
|
||||||
watcher:
|
watcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -601,10 +568,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: web
|
name: web
|
||||||
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.1.4-beta"
|
||||||
webdriver:
|
webdriver:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -628,11 +595,7 @@ packages:
|
||||||
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
|
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
<<<<<<< HEAD
|
|
||||||
version: "1.0.4"
|
version: "1.0.4"
|
||||||
=======
|
|
||||||
version: "1.0.3"
|
|
||||||
>>>>>>> bb189b31687f0d63efe9893fe4802b9d7f39782d
|
|
||||||
yaml:
|
yaml:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -642,5 +605,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.2"
|
version: "3.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.2.0-194.0.dev <4.0.0"
|
dart: ">=3.1.5 <4.0.0"
|
||||||
flutter: ">=3.13.0"
|
flutter: ">=3.13.0"
|
||||||
|
|
|
@ -10,16 +10,14 @@ class MockSharedPreferences extends Mock implements SharedPreferences {}
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('PreferencesService Tests', () {
|
group('PreferencesService Tests', () {
|
||||||
MockSharedPreferences mockPrefs;
|
|
||||||
PreferencesService service = PreferencesService();
|
PreferencesService service = PreferencesService();
|
||||||
|
|
||||||
setUp(() {
|
setUp(() {
|
||||||
mockPrefs = MockSharedPreferences();
|
|
||||||
SharedPreferences.setMockInitialValues({}); // Set initial values for mocks
|
SharedPreferences.setMockInitialValues({}); // Set initial values for mocks
|
||||||
});
|
});
|
||||||
|
|
||||||
test('saveColorPair and loadColorPair should work correctly', () async {
|
test('saveColorPair and loadColorPair should work correctly', () async {
|
||||||
var testColorPair = ColorPair(name: "test", textColor: Color(0xff123456), backgroundColor: Color(0xff654321));
|
var testColorPair = ColorPair(name: "test", textColor: const Color(0xff123456), backgroundColor: const Color(0xff654321));
|
||||||
|
|
||||||
// Save color pair
|
// Save color pair
|
||||||
await service.saveColorPair(testColorPair);
|
await service.saveColorPair(testColorPair);
|
||||||
|
@ -143,7 +141,7 @@ void main() {
|
||||||
await service.saveDiaryEntry(testEntry);
|
await service.saveDiaryEntry(testEntry);
|
||||||
|
|
||||||
final DiaryEntry? retrievedEntry = await service.getDiaryEntryByCurrentDate();
|
final DiaryEntry? retrievedEntry = await service.getDiaryEntryByCurrentDate();
|
||||||
expect(retrievedEntry?.texts.join(" "), equals((testEntry?.texts.join(" "))));
|
expect(retrievedEntry?.texts.join(" "), equals((testEntry.texts.join(" "))));
|
||||||
expect(retrievedEntry?.date, equals(formattedDate));
|
expect(retrievedEntry?.date, equals(formattedDate));
|
||||||
expect(retrievedEntry?.percentValue, testEntry.percentValue);
|
expect(retrievedEntry?.percentValue, testEntry.percentValue);
|
||||||
});
|
});
|
||||||
|
@ -162,7 +160,7 @@ void main() {
|
||||||
await service.saveDiaryEntry(testEntry);
|
await service.saveDiaryEntry(testEntry);
|
||||||
|
|
||||||
final DiaryEntry? retrievedEntry = await service.getDiaryEntryByCurrentDate();
|
final DiaryEntry? retrievedEntry = await service.getDiaryEntryByCurrentDate();
|
||||||
expect(retrievedEntry?.texts.join(" "), equals((testEntry?.texts.join(" "))));
|
expect(retrievedEntry?.texts.join(" "), equals((testEntry.texts.join(" "))));
|
||||||
expect(retrievedEntry?.date, equals(formattedDate));
|
expect(retrievedEntry?.date, equals(formattedDate));
|
||||||
expect(retrievedEntry?.percentValue, testEntry.percentValue);
|
expect(retrievedEntry?.percentValue, testEntry.percentValue);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue