add 400+ unit tests for domain and application layers
Some checks failed
CI / Check / Test (push) Has been cancelled
Some checks failed
CI / Check / Test (push) Has been cancelled
Extract ReviewLogger trait to decouple import/integrations from diary::log_review (cross-module coupling smell). Add in-memory fakes for all repository ports, enabling isolated testing of every use case module without a database. Coverage: domain+application 22% → 80%, 427 tests.
This commit is contained in:
@@ -7,7 +7,6 @@ use domain::{
|
||||
use crate::{
|
||||
context::AppContext,
|
||||
diary::commands::{LogReviewCommand, MovieInput},
|
||||
diary::log_review,
|
||||
integrations::commands::ConfirmWatchEventsCommand,
|
||||
};
|
||||
|
||||
@@ -54,7 +53,7 @@ pub async fn execute(ctx: &AppContext, cmd: ConfirmWatchEventsCommand) -> Result
|
||||
watched_at: *event.watched_at(),
|
||||
};
|
||||
|
||||
log_review::execute(ctx, review_cmd).await?;
|
||||
ctx.services.review_logger.log_review(review_cmd).await?;
|
||||
|
||||
ctx.repos
|
||||
.watch_event
|
||||
@@ -66,3 +65,7 @@ pub async fn execute(ctx: &AppContext, cmd: ConfirmWatchEventsCommand) -> Result
|
||||
|
||||
Ok(confirmed)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "tests/confirm.rs"]
|
||||
mod tests;
|
||||
|
||||
Reference in New Issue
Block a user