public void AdminisitratorDeleteAndTeamDeleteOk()
        {
            administrator = DataCreation.CreateAdministrator(nameOK, surnameOK, mailOK, passwordOK, birthdayOk);

            usersInTeam = new List <User>();

            usersInTeam.Add(administrator);

            team = DataCreation.CreateTeam(teamNameOK, teamDateOK, administrator, descriptionOK, maxUsersOK, usersInTeam);

            administratorHandler.AddAdministrator(administrator);

            teamHandler.AddTeam(team);

            userHandler.DeleteUser(administrator.mail);

            bool isUserActive = userHandler.GetUserFromColecction(administrator.mail).active;

            bool existsTeam = teamHandler.ExistsTeam(team);

            Assert.IsTrue(!existsTeam && !isUserActive);
        }
Пример #2
0
        public void TeamOKCreatedByAdministrator()
        {
            administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk);

            colaboratorCreator = DataCreation.CreateColaborator(userNameOK, userSurnameOK, anotherUserMailOK, userPasswordOK, userBirthdayOk);

            usersInTeam = new List <User>();

            usersInTeam.Add(administratorCreator);

            usersInTeam.Add(colaboratorCreator);

            administratorHandler.AddAdministrator(administratorCreator);

            colaboratorHandler.AddColaborator(colaboratorCreator);

            team = DataCreation.CreateTeam(nameOK, dateOK, administratorCreator, descriptionOK, maxUsersOK, usersInTeam);

            Team team1 = DataCreation.CreateTeam("team2", dateOK, administratorCreator, descriptionOK, maxUsersOK, usersInTeam);

            teamHandler.AddTeam(team);

            teamHandler.AddTeam(team1);

            Assert.IsTrue(teamPersistence.ExistsTeam(teamHandler.GetTeamFromCollection(team.name)));
        }