mudular code ready to fork

This commit is contained in:
gitea
2025-11-08 12:54:40 +01:00
parent 5f8d8330f5
commit 8c6bf598f5
21 changed files with 288 additions and 519 deletions
+11 -10
View File
@@ -1,6 +1,7 @@
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:mockito/annotations.dart';
import 'package:app_boilerplate/core/exceptions/firebase_exception.dart' show FirebaseServiceException;
import 'package:app_boilerplate/data/firebase/firebase_service.dart';
import 'package:app_boilerplate/data/firebase/models/firebase_config.dart';
import 'package:app_boilerplate/data/local/local_storage_service.dart';
@@ -81,7 +82,7 @@ void main() {
// but that's expected - Firebase requires actual project setup
expect(
() => service.initialize(),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
});
@@ -102,7 +103,7 @@ void main() {
email: '[email protected]',
password: 'password123',
),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
@@ -118,7 +119,7 @@ void main() {
email: '[email protected]',
password: 'password123',
),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
@@ -134,7 +135,7 @@ void main() {
expect(
() => service.logout(),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
});
@@ -152,7 +153,7 @@ void main() {
expect(
() => service.syncItemsToFirestore('user1'),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
@@ -165,7 +166,7 @@ void main() {
expect(
() => service.syncItemsToFirestore('user1'),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
@@ -181,7 +182,7 @@ void main() {
expect(
() => service.syncItemsFromFirestore('user1'),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
@@ -194,7 +195,7 @@ void main() {
expect(
() => service.syncItemsFromFirestore('user1'),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
});
@@ -215,7 +216,7 @@ void main() {
expect(
() => service.uploadFile(testFile, 'test/path.txt'),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
@@ -231,7 +232,7 @@ void main() {
expect(
() => service.uploadFile(testFile, 'test/path.txt'),
throwsA(isA<FirebaseException>()),
throwsA(isA<FirebaseServiceException>()),
);
});
});