use mockers::Scenario; use mockers_derive::mocked; #[test] fn test_mock_struct() { #[mocked] struct S {} #[mocked] impl S { fn foo(&self) -> u32 { 0 } } let scenario = Scenario::new(); let (mock, handle) = scenario.create_mock::(); scenario.expect(handle.foo().and_return(42)); assert_eq!(mock.foo(), 42); }