public void BlackboardWithoutTeam() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboard = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, heightOk, widthOk, administratorCreator, null); blackboardHandler.AddBlackboard(blackboard); }
public void BlackbordDifferentNameAndSameTeam() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboard1 = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, heightOk, widthOk, administratorCreator, teamOwner); blackboard2 = DataCreation.CreateBlackboard(anotherBlackboardNameOk, blackboardDescriptionOk, heightOk, widthOk, administratorCreator, teamOwner); Assert.IsFalse(blackboard1.Equals(blackboard2)); }
public void BlackboardOkCreatedByAdministrator() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboard = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, heightOk, widthOk, administratorCreator, teamOwner); blackboardPersistence.AddBlackboard(blackboard); Assert.AreEqual(blackboardNameOk, blackboard.name); }
public void BlackboardDescriptionToLong() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); string invalidDescription = "This is not a valid description because it is to long, you can write max 50 letters"; blackboard = DataCreation.CreateBlackboard(blackboardNameOk, invalidDescription, heightOk, widthOk, administratorCreator, teamOwner); blackboardHandler.AddBlackboard(blackboard); }
public void BlackboardNameToLong() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); string invalidName = "This name is not valid because it is too long"; blackboard = DataCreation.CreateBlackboard(invalidName, blackboardDescriptionOk, heightOk, widthOk, administratorCreator, teamOwner); blackboardHandler.AddBlackboard(blackboard); }
public void ImageUserOwnerNull() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, anotherUserMailOk, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboardOwner = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, blackboardHeightOk, blackboardWidthOk, administratorCreator, teamOwner); image = DataCreation.CreateImage(null, blackboardOwner, widthOk, heightOk, originPointOk, urlOk, formatOk); imageHandler.AddElement(image); }
public void TextBoxUserOwnerNull() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboardOwner = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, blackboardHeightOk, blackboardWidthOk, administratorCreator, teamOwner); textBox = DataCreation.CreateTextBox(null, blackboardOwner, widthOk, heightOk, originPointOk, contentOk, fontOk, fontSizeOk); textBoxHandler.AddElement(textBox); }
public void TextBoxNull() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboardOwner = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, blackboardHeightOk, blackboardWidthOk, administratorCreator, teamOwner); textBox = DataCreation.CreateTextBox(administratorCreator, blackboardOwner, widthOk, heightOk, originPointOk, contentOk, fontOk, fontSizeOk); anotherTextBox = null; Assert.IsFalse(textBox.Equals(anotherTextBox)); }
public void ImageOkCreatedByAdministrator() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboardOwner = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, blackboardHeightOk, blackboardWidthOk, administratorCreator, teamOwner); image = DataCreation.CreateImage(administratorCreator, blackboardOwner, widthOk, heightOk, originPointOk, urlOk, formatOk); imageHandler.AddElement(image); Assert.AreEqual(image, imageHandler.GetElementFromCollection(image.id, image.blackboardOwner)); }
public void ImageFormatNotAccepted() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboardOwner = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, blackboardHeightOk, blackboardWidthOk, administratorCreator, teamOwner); string invalidFormat = ".mp4"; image = DataCreation.CreateImage(administratorCreator, blackboardOwner, widthOk, heightOk, originPointOk, urlOk, invalidFormat); imageHandler.AddElement(image); }
public void ImageSameIdAndSameBlackboard() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboardOwner = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, blackboardHeightOk, blackboardWidthOk, administratorCreator, teamOwner); image = DataCreation.CreateImage(administratorCreator, blackboardOwner, widthOk, heightOk, originPointOk, urlOk, formatOk); anotherImage = DataCreation.CreateImage(administratorCreator, blackboardOwner, widthOk, heightOk, originPointOk, urlOk, formatOk); anotherImage.id = image.id; Assert.IsTrue(image.Equals(anotherImage)); }
public void CommentUserCreatorNull() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(colaboratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboard = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, heightOk, widthOk, administratorCreator, teamOwner); textBox = DataCreation.CreateTextBox(administratorCreator, blackboard, imageWidthOk, imageHeightOk, originPointOk, contentOk, fontOk, fontSizeOk); comment = DataCreation.CreateComment(commentDescriptionOk, creationDateOk, null, textBox); commentHandler.AddComment(comment); }
public void TextBoxOkCreatedByAdministrator() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(administratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboardOwner = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, blackboardHeightOk, blackboardWidthOk, administratorCreator, teamOwner); textBox = DataCreation.CreateTextBox(administratorCreator, blackboardOwner, widthOk, heightOk, originPointOk, contentOk, fontOk, fontSizeOk); textBoxHandler.AddElement(textBox); Assert.AreEqual(textBox, textBoxHandler.GetElementFromCollection(textBox.id, textBox.blackboardOwner)); }
public void CommentDescriptionInvalidSize() { usersInTeam = new List <User>(); administratorCreator = DataCreation.CreateAdministrator(userNameOK, userSurnameOK, userMailOK, userPasswordOK, userBirthdayOk); usersInTeam.Add(colaboratorCreator); teamOwner = DataCreation.CreateTeam(teamNameOK, teamDateOK, administratorCreator, teamDescriptionOK, teamMaxUsersOK, usersInTeam); blackboard = DataCreation.CreateBlackboard(blackboardNameOk, blackboardDescriptionOk, heightOk, widthOk, administratorCreator, teamOwner); textBox = DataCreation.CreateTextBox(administratorCreator, blackboard, imageWidthOk, imageHeightOk, originPointOk, contentOk, fontOk, fontSizeOk); string invalidDescription = "This is an invalid size of description because it is to long, only accept 50 characters"; comment = DataCreation.CreateComment(invalidDescription, creationDateOk, administratorCreator, textBox); commentHandler.AddComment(comment); }