public void personTest2ConstructorParametrs() { Person p; string newLogin = "******"; string newPassword = "******"; string newCountry = "3"; string newAge = "4"; List<Indie> newindieGlib = new List<Indie>(); GameLibrary newglib = new GameLibrary(); DateTime newTime = new DateTime(); string newAvatar = "5"; p = new Person(newLogin, newPassword, newCountry, newAge, newindieGlib, newglib, newTime, newAvatar); if (p.GetAge() != "4") { Assert.Fail(); } if (p.GetAvatar() != "5") { Assert.Fail(); } if (p.GetCountry() != "3") { Assert.Fail(); } if (p.GetLogin() != "1") { Assert.Fail(); } if (p.GetPassword() != "2") { Assert.Fail(); } }
public void personTest2GetAvatar() { Person p; string newLogin = "******"; string newPassword = "******"; string newCountry = "3"; string newAge = "4"; List<Indie> newindieGlib = new List<Indie>(); newindieGlib.Add(new Indie()); newindieGlib.Add(new Indie()); GameLibrary newglib = new GameLibrary(); newglib.Add(new Game()); newglib.Add(new Game()); newglib.Add(new Game()); DateTime newTime = new DateTime(); string newAvatar = "5"; p = new Person(newLogin, newPassword, newCountry, newAge, newindieGlib, newglib, newTime, newAvatar); if (p.GetAvatar() != "5") { Assert.Fail(); } }
public void personTest2Sets() { Person p = new Person(); string newLogin = "******"; string newPassword = "******"; string newCountry = "3"; string newAge = "4"; List<Indie> newindieGlib = new List<Indie>(); GameLibrary newglib = new GameLibrary(); DateTime newTime = new DateTime(22); string newAvatar = "5"; p.Login = newLogin; p.Avatar = newAvatar; p.Password = newPassword; p.Glib = newglib; p.IndieGlib = newindieGlib; p.Country = newCountry; p.Age = newAge; p.Time = newTime.ToString(); p.Security = "user"; if (p.GetAge() != "4") { Assert.Fail(); } if (p.GetAvatar() != "5") { Assert.Fail(); } if (p.GetCountry() != "3") { Assert.Fail(); } if (p.GetLogin() != "1") { Assert.Fail(); } if (p.GetPassword() != "2") { Assert.Fail(); } }