Skip to content

Instantly share code, notes, and snippets.

@ifew
Created July 5, 2018 09:13
Show Gist options
  • Save ifew/2a112ce61cb112ffec6f997aca415403 to your computer and use it in GitHub Desktop.
Save ifew/2a112ce61cb112ffec6f997aca415403 to your computer and use it in GitHub Desktop.
.Net Core 2 Stub Test
using System;
using Xunit;
namespace member_stub
{
public class MemberTest
{
[Fact]
public void When_Member_Access_to_Profile() {
Member member = new Member(new StubAuthorize());
string is_authorized = member.Profile();
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