I have a method which inside calls another method.
This method has only one signature, for example:
Koko(ComplexType isKoko)
I want to verify that this method executed without checking the instance of the parameter and doing something like this:
It check_description = () => mockKoko.Verify(x => x.Koko(anything), Times.Once());
I searched the forum and Google and couldn't find an answer.
I'll appreciate any help.
mock.Verify(m => m.MethodToCheckIfCalled(It.Is<IUserDTO>(x => x.LastName == "3" & x.FirstName == "2")));
You can use It.IsAny<ComplexType>()
:
check_description = () => mockKoko.Verify(x => x.Koko(It.IsAny<ComplexType>()), Times.Once());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With