public void Success_GetSessionKey() { //Arrange string result; CustomUser user; //Act user = new CustomUser { Username = "******", Password = "******", Email = "ClassLibrary1 - Test user database - AssignSessionKey", IsActive = true, Wallet = 500, LoggedIn = true }; result = db_user.CreateUser(user); usernames.Add(user.Username); if (result.Equals("Success")) { result = db_user.AssignSessionKey(user); if (result.Equals("Success")) { result = db_user.GetSessionKey(user); } } //Assert Assert.IsTrue(!result.Equals(null) && !result.Equals("") && !result.Equals("Success")); }
/// <summary> /// gets a session key from a user. /// </summary> /// <param name="user"></param> /// <returns>string</returns> public string GetSessionKey(CustomUser user) { return(db_user.GetSessionKey(user)); }