Created
April 11, 2021 20:03
-
-
Save StacyGay/0d00ebe5e3bd8a208159aa6b7ae067f0 to your computer and use it in GitHub Desktop.
Trinity of test - Moq
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
[Fact] | |
public void Basic_Unit_Test() | |
{ | |
var mockRepo = new Mock<IMyRepo>(); | |
mockRepo.Setup(foo => foo.GetSomething(It.IsAny<int>())).Returns("Something"); | |
var serviceUnderTest = new MyUpperService(mockRepo); | |
var result = serviceUnderTest.MakeUpper(); | |
Assert.Equal("SOMETHING",result); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment