Created
November 8, 2018 16:46
-
-
Save osmyn/a7abc97ff49a347caf8e649297793552 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Mock<IService> DefaultService() | |
{ | |
var mock = new Mock<IService>(); | |
mock.Setup(x => x.MyMethod(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>())) | |
.Returns<string, string, string>((typeName, comments, updatedBy) => Task.Run(() => | |
new MyType | |
{ | |
TypeName = typeName, | |
Comments = comments, | |
UpdatedBy = updatedBy | |
})); | |
return mock; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment