Mid Testing

How do you mock properties using Moq?

mockService.SetupGet(s => s.Name).Returns("MockName");

This sets up a mocked property getter to return a specific value.

More from C# Programming Tutorial

All questions for this course