You can use a callback to assert that the values match what you expect.
UIServicemock
.Setup(u => u.ShowMessage(It.IsAny<int>(), It.IsAny<string>(), It.IsAny<string>(),
It.IsAny<MessageBoxButton>(), It.IsAny<MessageBoxImage>()))
.Callback<int, string, string, MessageBoxButton, MessageBoxImage>((window, message, error, button, image) => {
Assert.That(message, Is.EqualTo("No cell selected"));
Assert.That(window, Is.EqualTo(StudioViewName.MainWindow));
});
Or you could use the It matchers that match specific parameters, as follows:
UIServicemock
.Setup(u => u.ShowMessage(
It.Is<int>(s => s == StudioViewName.MainWindow),
It.IsIn<string>("No cell selected"),
It.IsAny<string>(),
It.IsAny<MessageBoxButton>(),
It.IsAny<MessageBoxImage>()));
I generally find the first method more flexible, but it is a bit more verbose.