Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
.Net Core 2 Fake
public void Display_Username_Shold_Be_iFew()
var _options = new DbContextOptionsBuilder<MemberContext>().UseInMemoryDatabase("get_by_id_members").Options;
var _context = new MemberContext(_options);
new MemberModel
Id = 1,
Fullname = "iFew",
Card_no = "6425880473",
Birthday = new DateTime(1987, 01, 01),
Mobilephone = "0912345678"
MemberService _memberService = new MemberService(_context);
MemberModel actual = _memberService.Get_Member_Information_By_ID("1");
Assert.Equal(1, actual.Id);
Assert.Equal("iFew", actual.Fullname);
Assert.Equal("6425880473", actual.Card_no);
Assert.Equal(new DateTime(1987, 01, 01), actual.Birthday);
Assert.Equal("0912345678", actual.Mobilephone);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.