Beispiel #1
0
        public void CreateRole_Null_Test()
        {
            //get all the roles from the db
            List <Role> previousRoles = rolesBL.GetAllRoles().ToList <Role>();
            //add a new role to the db
            string roleName = null;

            rolesBL.AddRole(roleName);

            List <Role> expectedRoles = new List <Role>();

            expectedRoles.AddRange(previousRoles); //add the previous Roles to the list

            List <Role> actualRoles = rolesBL.GetAllRoles().ToList <Role>();

            //check if expected roles with the actual roles are equal
            AreListsEqual(expectedRoles, actualRoles);
        }