mock return value moq code example Example: moq return mockset mockSet.As>().Setup(m => m.GetEnumerator()) .Returns(myClassAs.GetEnumerator);