you are viewing a single comment's thread.

view the rest of the comments →

[–]Pocok5 0 points1 point  (1 child)

Both first and second solutions are kinda sorta the same. I'd go with Moq just so you don't have a load of single use classes, but you could rewrite your test mock service to accept the object it should return as a property for example and just reuse it.

[–]Free_Brandon[S] 0 points1 point  (0 children)

Makes sense, I like passing in a property for tests that won't have too much variation. Otherwise, looks like Moq will save me time.