Exemplo n.º 1
0
        public void addAdmin()
        {
            var account  = new ManageAccountController(new AdminList(), new ManagerList(), new MemberList(), new ProviderList());
            var newAdmin = new Admin()
            {
                Name          = "Mike",
                StreetAddress = "12th Ave",
                City          = "Minneapolis",
                State         = "MN",
                ZipCode       = "12446"
            };
            var result = account.addAdmin(newAdmin);

            Assert.IsTrue(null != result, "Failed to add an admin.");
        }
Exemplo n.º 2
0
        public void GetAdmin()
        {
            var controller = new ManageAccountController(new AdminList(), new ManagerList(), new MemberList(), new ProviderList());

            var newAdmin = new Admin()
            {
                Name          = "Mike",
                StreetAddress = "12th Ave",
                City          = "Minneapolis",
                State         = "MN",
                ZipCode       = "12446"
            };
            var newAdminId = controller.addAdmin(newAdmin);

            Assert.IsTrue(null != newAdminId, "Failed to add an admin.");

            var admin = controller.GetAdmin(newAdminId.Value);

            Assert.IsTrue(null != admin, "admin not found");

            var success = controller.DeleteAdmin(newAdminId.Value);
        }