style: cargo fmt --all

This commit is contained in:
2026-05-31 05:31:42 +02:00
parent 4b31a0f74b
commit c2ebca0da0
138 changed files with 2422 additions and 1164 deletions

View File

@@ -1,10 +1,10 @@
use std::sync::Arc;
use application::processing::{ReportBatchProgressHandler, ReportBatchProgressQuery};
use application::testing::{InMemoryJobBatchRepository, InMemoryJobRepository};
use application::processing::{ReportBatchProgressQuery, ReportBatchProgressHandler};
use domain::entities::{Job, JobBatch, JobType};
use domain::errors::DomainError;
use domain::ports::{JobBatchRepository, JobRepository};
use domain::value_objects::{StructuredData, SystemId};
use std::sync::Arc;
#[tokio::test]
async fn returns_progress() {
@@ -21,7 +21,10 @@ async fn returns_progress() {
job_repo.save(&j2).await.unwrap();
let handler = ReportBatchProgressHandler::new(batch_repo.clone(), job_repo.clone());
let progress = handler.execute(ReportBatchProgressQuery { batch_id }).await.unwrap();
let progress = handler
.execute(ReportBatchProgressQuery { batch_id })
.await
.unwrap();
assert_eq!(progress.batch.batch_id, batch_id);
assert_eq!(progress.jobs.len(), 2);
@@ -33,9 +36,11 @@ async fn rejects_nonexistent_batch() {
let job_repo = Arc::new(InMemoryJobRepository::new());
let handler = ReportBatchProgressHandler::new(batch_repo.clone(), job_repo.clone());
let result = handler.execute(ReportBatchProgressQuery {
batch_id: SystemId::new(),
}).await;
let result = handler
.execute(ReportBatchProgressQuery {
batch_id: SystemId::new(),
})
.await;
assert!(matches!(result, Err(DomainError::NotFound(_))));
}