public Speaker Login(string username, string password) { Speaker s = repo.GetOne(username); if (s.Password == password) { return(s); } else { return(new Speaker("", "", "", "", "")); } }
public void test() { RepositorySpeakers repo123 = new RepositorySpeakers(); //repo123.Save(new Speaker("username", "password", "ion", "iancu", "*****@*****.**")); Speaker r = new Speaker("username", "password", "ion", "iancu", "*****@*****.**"); Debug.Assert(repo123.GetOne("username").Username == "username"); RepositoryReviews repo = new RepositoryReviews(); Debug.Assert(repo.GetOne(5).IdP == 4); RepositoryListeners repl = new RepositoryListeners(); Debug.Assert(repl.GetOne("BertW").Password == "wysco"); RepositoryCommitteeMembers repcm = new RepositoryCommitteeMembers(); Debug.Assert(repcm.GetOne("BenG").FirstName == "Gonzalez"); RepositoryBiddings repb = new RepositoryBiddings(); Debug.Assert(repb.GetOne("AndiP 5").Accepted == true); }