Swent-team-6 / icebreakrr

2 stars 1 forks source link

Feature/location service and repository #116

Closed arthur-mrgt closed 1 week ago

arthur-mrgt commented 2 weeks ago

Add LocationService and GeoFirestoreRepository with Unit Tests

Overview

This pull request introduces two new classes, LocationService and GeoFirestoreRepository, along with comprehensive unit tests for each. These additions enhance the application's ability to manage real-time location updates and user position storage in Firestore. The PR includes the following changes:

Key Features

  1. LocationService:

    • Manages real-time location updates with customizable distance thresholds.
    • Provides high-accuracy location requests with configurable intervals.
    • Implements callbacks for location updates and error handling.
    • Logs exceptions for API errors and unexpected issues.
  2. GeoFirestoreRepository:

    • Handles user location updates in Firestore using GeoFirestore.
    • Supports location updates for authenticated users and logs unauthenticated access attempts.
    • Logs successful updates and errors, ensuring better traceability.

Unit Tests

Comprehensive unit tests are included for both classes:

This PR brings greater flexibility and reliability to location services, ensuring efficient and secure location tracking and updating functionalities.

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
87.1% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud