Esempio n. 1
0
        public void CreateDoubleTest()
        {
            var ctrl     = new CreateEmployeeController();
            var mgr      = DbMgr.Instance;
            var username = "******";
            var password = "******";
            var confpass = "******";

            int newId     = ctrl.Create(username, password, confpass, "Manager");
            int duplicate = ctrl.Create(username, password, confpass, "Manager");
        }
Esempio n. 2
0
        public void CreateBadPermTest()
        {
            var ctrl     = new CreateEmployeeController();
            var mgr      = DbMgr.Instance;
            var username = "******";
            var password = "******";
            var confpass = "******";

            int newId = ctrl.Create(username, password, confpass, "Dragon Slayer");
        }
Esempio n. 3
0
        public void CreateTest()
        {
            var ctrl     = new CreateEmployeeController();
            var mgr      = DbMgr.Instance;
            var username = "******";
            var password = "******";
            var confpass = "******";

            int      newId       = ctrl.Create(username, password, confpass, "Manager");
            Employee justCreated = mgr.GetEmployeeById(newId);

            Assert.IsNotNull(justCreated);
        }