Skip to content

Instantly share code, notes, and snippets.

@ifew
Created July 5, 2018 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ifew/e9a674894ac6f3101f2c11ea36d47544 to your computer and use it in GitHub Desktop.
Save ifew/e9a674894ac6f3101f2c11ea36d47544 to your computer and use it in GitHub Desktop.
.Net Core 2 Test Doubles
using System;
namespace member_dummy
{
public class Member
{
Boolean authorized;
public Member(IAuthorize authorize) {
this.authorized = authorize.CheckAuthorize("ifew", "1234");
}
public string Profile() {
if(this.authorized)
return "Welcome to member area";
return "This not member area";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment