public void TestRegistryAdmin() { //Arange work.RegistryAdmin("Log", "0000"); //Act BLL.Managment.AdminsManagment admins = new BLL.Managment.AdminsManagment(); admins.SaveChanges(); admins.Load(); // Assert Assert.AreEqual("Log", admins.GetList().ElementAt(admins.GetList().Count - 1).Email); }
public void TestRemoveAdmin() { //Arange BLL.Managment.AdminsManagment admins = new BLL.Managment.AdminsManagment(); Admin admi = new Admin("Oksi", "Buba"); admins.Insert(admi); admins.SaveChanges(); admins.Load(); //Act admins.Delete(admi); // Assert if (admins.GetList().Count != 0) { Assert.AreNotEqual(admi, admins.GetList().ElementAt(admins.GetList().Count - 1)); } }