////! Tests mocking trait implementing fluent interface. /*use mockers_derive::mocked; use mockers::Scenario; #[mocked] pub trait MoveBuilder { fn set_result( self, result: u8) -> Self; fn build(&self) -> u8; } #[mocked] pub trait RefBuilder { fn set_result(&mut self, result: u8) -> &mut dyn Builder; fn build(&self) -> u8; } #[test] fn test_move_builder() { let scenario = Scenario::new(); let (mut mock, handle) = scenario.create_mock_for::(); scenario.expect(handle.set_result(20).and_call(|self| self)); scenario.expect(handle.build().and_return(20)); assert_eq!(mock.set_result(20).build(), 20); } #[test] fn test_ref_builder() { let scenario = Scenario::new(); let (mut mock, handle) = scenario.create_mock_for::(); scenario.expect(handle.set_result(20).and_call(|self| self)); scenario.expect(handle.build().and_return(20)); assert_eq!(mock.set_result(20).build(), 20); }*/