TheNullest / planning-and-scheduling-app

اپلیکیشنی برای برنامه ریزی و ثبت زمان و مقدار پیشرفت : کارها، وظایف و رویدادها
0 stars 0 forks source link

Implementation : A Comprehensive Test for Data and Domain Layer of Task Feature #15

Open TheNullest opened 6 days ago

TheNullest commented 6 days ago

Description: This task involves writing and executing comprehensive tests for the Task feature in both the Data and Domain layers. The goal is to ensure that all components function correctly and reliably, adhering to the defined business logic and data operations. Testing will cover unit tests for individual components and integration tests to verify the interaction between different layers.

Key Responsibilities:

Testing Components:

  1. Domain Layer:

    • Use Cases: Test the business logic encapsulated in use cases.
      • Example: CreateMainTaskUseCase, GetMainTasksUseCase, UpdateMainTaskUseCase, DeleteMainTaskUseCase.
    • Repositories: Mock the HiveMainTaskRepositoryImpl to test use cases in isolation.
    • HiveMainTaskModel: Test the model’s named constructor fromEntity and methods toEntity, fromEntity, and copyWith
  2. Data Layer:

    • HiveMainTaskDataStore: Test the data operations directly interacting with the Hive database.
      • Example: createMainTask, getMainTasks, getMainTaskById, updateMainTask, deleteMainTask.
    • MainTaskRepository: Test the repository methods that interact with the HiveMainTaskDataStore.

Implementation Considerations:

TheNullest commented 4 days ago

Domain layer tests were done in #13 Implementation : DomainLayer.UseCases