Skip to content

Instantly share code, notes, and snippets.

@ifew
Last active July 5, 2018 15:44
Show Gist options
  • Save ifew/6c47ec08d633ddad7bd8bb9d38da25b4 to your computer and use it in GitHub Desktop.
Save ifew/6c47ec08d633ddad7bd8bb9d38da25b4 to your computer and use it in GitHub Desktop.
.Net Core Mock Test
public void When_Member_Access_to_Profile() {
MockAuthorize mock = new MockAuthorize();
Member member = new Member(mock);
string is_authorized = member.Profile();
Assert.True(mock.VerifyCheckAuthorize());
Assert.Equal("Welcome to member area", is_authorized);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment