feat: order: LineItem add and update cmd,events&service #59
4 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,7 @@ use mockall::predicate::*;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::{
|
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,
|
update_line_item_command::UpdateLineItemCommand,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -20,11 +20,11 @@ pub struct LineItemDeletedEvent {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
pub mod tests {
|
pub mod tests {
|
||||||
use crate::ordering::domain::delete_line_item::DeleteLineItemCommand;
|
use crate::ordering::domain::delete_line_item_command::DeleteLineItemCommand;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub fn get_updated_line_item_event_from_command(
|
pub fn get_deleted_line_item_event_from_command(
|
||||||
cmd: &DeleteLineItemCommand,
|
cmd: &DeleteLineItemCommand,
|
||||||
) -> LineItemDeletedEvent {
|
) -> LineItemDeletedEvent {
|
||||||
LineItemDeletedEventBuilder::default()
|
LineItemDeletedEventBuilder::default()
|
||||||
|
@ -36,6 +36,6 @@ pub mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_event() {
|
fn test_event() {
|
||||||
get_updated_line_item_event_from_command(&DeleteLineItemCommand::get_cmd());
|
get_deleted_line_item_event_from_command(&DeleteLineItemCommand::get_cmd());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub mod line_item_aggregate;
|
||||||
// commands
|
// commands
|
||||||
pub mod add_line_item_command;
|
pub mod add_line_item_command;
|
||||||
pub mod commands;
|
pub mod commands;
|
||||||
pub mod delete_line_item;
|
pub mod delete_line_item_command;
|
||||||
pub mod update_line_item_command;
|
pub mod update_line_item_command;
|
||||||
|
|
||||||
// events
|
// events
|
||||||
|
|
Loading…
Reference in a new issue