Hello thanks for this post blog.
But I don't agree with some points.
To throw exceptions, I think that Nsubstitute is the winner because the syntaxe is
moq.Method().Throws();
instead of your suggestion
the example of Multi-returns is not the same, so we feel that the syntaxe of moq is better or equal to Nsubstitute one. But for the example :
mock.SetupSequence(x => x.Users)
.Returns(users1)
.Returns(users2)
.Returns(users3);
the best syntaxe of Nsubstitute would be
mock.Users.Returns(users1, users2, users3);
So for me Nsubstitute is better about multi-returns
Regarding Multi-Returns, in my opinion Moq has a more readable syntax, but is only my opinion and I'm very glad to hear that you have your own point of view 🙂
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello thanks for this post blog.
But I don't agree with some points.
To throw exceptions, I think that Nsubstitute is the winner because the syntaxe is
moq.Method().Throws();
instead of your suggestion
the example of Multi-returns is not the same, so we feel that the syntaxe of moq is better or equal to Nsubstitute one. But for the example :
mock.SetupSequence(x => x.Users)
.Returns(users1)
.Returns(users2)
.Returns(users3);
the best syntaxe of Nsubstitute would be
mock.Users.Returns(users1, users2, users3);
So for me Nsubstitute is better about multi-returns
Hi Dorra, do you have good points here
Let me check about the Throws...
Regarding Multi-Returns, in my opinion Moq has a more readable syntax, but is only my opinion and I'm very glad to hear that you have your own point of view 🙂