From f295666bd0c7255c59ccb02e59ab3b7f5d89af77 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Tue, 23 Jul 2024 17:55:09 +0530 Subject: [PATCH] fix: rename delete_line_item > delete_line_item_command --- src/ordering/domain/commands.rs | 2 +- .../{delete_line_item.rs => delete_line_item_command.rs} | 0 src/ordering/domain/line_item_deleted_event.rs | 6 +++--- src/ordering/domain/mod.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/ordering/domain/{delete_line_item.rs => delete_line_item_command.rs} (100%) diff --git a/src/ordering/domain/commands.rs b/src/ordering/domain/commands.rs index 79054d4..6a74d43 100644 --- a/src/ordering/domain/commands.rs +++ b/src/ordering/domain/commands.rs @@ -6,7 +6,7 @@ use mockall::predicate::*; use serde::{Deserialize, Serialize}; use super::{ - add_line_item_command::AddLineItemCommand, delete_line_item::DeleteLineItemCommand, + add_line_item_command::AddLineItemCommand, delete_line_item_command::DeleteLineItemCommand, update_line_item_command::UpdateLineItemCommand, }; diff --git a/src/ordering/domain/delete_line_item.rs b/src/ordering/domain/delete_line_item_command.rs similarity index 100% rename from src/ordering/domain/delete_line_item.rs rename to src/ordering/domain/delete_line_item_command.rs diff --git a/src/ordering/domain/line_item_deleted_event.rs b/src/ordering/domain/line_item_deleted_event.rs index 3b12d81..d90efb6 100644 --- a/src/ordering/domain/line_item_deleted_event.rs +++ b/src/ordering/domain/line_item_deleted_event.rs @@ -20,11 +20,11 @@ pub struct LineItemDeletedEvent { #[cfg(test)] pub mod tests { - use crate::ordering::domain::delete_line_item::DeleteLineItemCommand; + use crate::ordering::domain::delete_line_item_command::DeleteLineItemCommand; use super::*; - pub fn get_updated_line_item_event_from_command( + pub fn get_deleted_line_item_event_from_command( cmd: &DeleteLineItemCommand, ) -> LineItemDeletedEvent { LineItemDeletedEventBuilder::default() @@ -36,6 +36,6 @@ pub mod tests { #[test] fn test_event() { - get_updated_line_item_event_from_command(&DeleteLineItemCommand::get_cmd()); + get_deleted_line_item_event_from_command(&DeleteLineItemCommand::get_cmd()); } } diff --git a/src/ordering/domain/mod.rs b/src/ordering/domain/mod.rs index 2edcc21..4758903 100644 --- a/src/ordering/domain/mod.rs +++ b/src/ordering/domain/mod.rs @@ -9,7 +9,7 @@ pub mod line_item_aggregate; // commands pub mod add_line_item_command; pub mod commands; -pub mod delete_line_item; +pub mod delete_line_item_command; pub mod update_line_item_command; // events