From 86f41e49f87764f9afd4be1d0d008a320dcfc331 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 26 Mar 2023 18:50:31 +0200 Subject: feat: add deserializing API interface definitions --- src/command.rs | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'src/command.rs') diff --git a/src/command.rs b/src/command.rs index 5d3c935..fd449aa 100644 --- a/src/command.rs +++ b/src/command.rs @@ -310,43 +310,10 @@ mod tests { use pretty_assertions::assert_str_eq; use quick_xml::events::Event; - use ridicule::mock; use ridicule::predicate::{always, eq, function}; use super::*; - - mock! { - MockDeserializer {} - - impl Deserializer for MockDeserializer { - fn de_tag( - &mut self, - tag_name: &str, - ignore_end: IgnoreEnd, - ) -> Result; - - fn de_tag_with( - &mut self, - tag_name: &str, - ignore_end: IgnoreEnd, - deserialize: DeserializeFn, - ) -> Result - where - Err: std::error::Error + Send + Sync + 'static, - DeserializeFn: FnOnce(&BytesStart, &mut MockDeserializer) -> Result; - - fn de_tag_list( - &mut self, - tag_name: &str - ) -> Result, DeserializerError>; - - fn de_text(&mut self) -> Result; - - fn skip_to_tag_start(&mut self, tag_name: &str) -> Result<(), DeserializerError>; - - fn skip_to_tag_end(&mut self, tag_name: &str) -> Result<(), DeserializerError>; - } - } + use crate::deserialization::MockDeserializer; #[test] fn deserialize_prototype_works_with_ptype() -- cgit v1.2.3-18-g5258