I have to verify multiple calls with different arguments to a method and MustBeCalled does the job.
Some pieces are missing, though.
For example, let's say I want to verify that the "Prompt(string text)" method is called just twice with the following two texts only: "hello", "world".
Mock.Arrange(() => foo.Prompt("hello")).DoNothing().MustBeCalled();
Mock.Arrange(() => foo.Prompt("world")).DoNothing().MustBeCalled();
How do I know that it wasn't called a third time with any other argument?
Thanks!
Also, I wanted to add that it's very annoying and especially time consuming not having any information about which MustBeCalled expectation failed.
Some pieces are missing, though.
For example, let's say I want to verify that the "Prompt(string text)" method is called just twice with the following two texts only: "hello", "world".
Mock.Arrange(() => foo.Prompt("hello")).DoNothing().MustBeCalled();
Mock.Arrange(() => foo.Prompt("world")).DoNothing().MustBeCalled();
How do I know that it wasn't called a third time with any other argument?
Thanks!
Also, I wanted to add that it's very annoying and especially time consuming not having any information about which MustBeCalled expectation failed.