private void CheckRegisterPasswordLength() { Account_Logic accountLogic = new Account_Logic(); Assert.False(accountLogic.Register(new Account("Bert", "12345", "*****@*****.**"))); Assert.True(accountLogic.Register(new Account("Bert", "123456", "*****@*****.**"))); }
// // GET: /Profile/Details/5 public ActionResult Details(int id = 0) { UserProfile user = db.UserProfiles.Find(id); if (user == null) { ViewBag.Message = "User not found."; return(View("Error")); } Profile profile = user.Profile; if (profile == null) { return(HttpNotFound()); } // Get List Follow List <UserProfile> listfollow = Follow_Logic.GetFollowingUsersOfType(2, id, 5); ViewBag.listfollow = listfollow; ViewBag._user = user; // Get list store follow List <Store> liststore = Account_Logic.GetListStoreFollowByUser(id); ViewBag.liststore = liststore; // Get list product like List <Product> listpro = Account_Logic.GetListProductLikeByUser(id); ViewBag.listpro = listpro; return(View(profile)); }
public void CheckLog_in() { Account_Logic accountLogic = new Account_Logic(); // Arrange Account account = new Account("Bert", "123456", "*****@*****.**"); Assert.False(accountLogic.Log_in(account.Name, account.Password)); // Act Assert.True(accountLogic.Register(account)); // Assert Assert.True(accountLogic.Log_in(account.Name, account.Password)); }