Implements mocking for MoveData
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-27 23:00:56 +01:00
parent ad9f17ccf1
commit d4b1cadad0
3 changed files with 29 additions and 13 deletions

View File

@@ -206,3 +206,27 @@ impl ValueIdentifiable for MoveDataImpl {
self.identifier
}
}
#[cfg(test)]
mockall::mock! {
#[derive(Debug)]
pub MoveData{}
impl MoveData for MoveData {
fn name(&self) -> &StringKey;
fn move_type(&self) -> TypeIdentifier;
fn category(&self) -> MoveCategory;
fn base_power(&self) -> u8;
fn accuracy(&self) -> u8;
fn base_usages(&self) -> u8;
fn target(&self) -> MoveTarget;
fn priority(&self) -> i8;
fn secondary_effect(&self) -> &Option<Box<dyn SecondaryEffect>>;
fn has_flag(&self, key: &StringKey) -> bool;
fn has_flag_by_hash(&self, key_hash: u32) -> bool;
}
impl ValueIdentifiable for MoveData{
fn value_identifier(&self) -> ValueIdentifier{
ValueIdentifier::new(0)
}
}
}