Move Form and Species to traits, implement a bunch of mocks
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -133,3 +133,26 @@ impl ValueIdentifiable for ItemImpl {
|
||||
self.identifier
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use super::*;
|
||||
|
||||
mockall::mock! {
|
||||
#[derive(Debug)]
|
||||
pub Item {}
|
||||
impl Item for Item {
|
||||
fn name(&self) -> &StringKey;
|
||||
fn category(&self) -> ItemCategory;
|
||||
fn battle_category(&self) -> BattleItemCategory;
|
||||
fn price(&self) -> i32;
|
||||
fn flags(&self) -> &HashSet<StringKey>;
|
||||
fn has_flag(&self, key: &StringKey) -> bool;
|
||||
}
|
||||
impl ValueIdentifiable for Item {
|
||||
fn value_identifier(&self) -> ValueIdentifier {
|
||||
ValueIdentifier::new(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user