UserServiceTest

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total1,473 of 1,4730%2 of 20%76764274277575
saveUser_shouldShouldCreateUserWhoIsPatientAlready()1250%20%22343411
saveUser_shouldGrantNewRolesInRolesListToUser()940%n/a11232311
saveUserProperties_shouldRemoveAllExistingPropertiesAndAssignNewProperties()660%n/a11181811
saveUserProperty_shouldAddNewPropertyToExistingUserProperties()520%n/a11131311
saveUser_shouldCreateNewUserWithBasicElements()490%n/a11121211
saveUser_shouldFailToCreateTheUserWithAWeakPassword()350%n/a119911
hasDuplicateUsername_shouldVerifyThatUsernameAndSystemIdIsUnique()320%n/a11101011
setUserProperty_shouldAddPropertyWithGivenKeyAndValueWhenKeyDoesNotAlreadyExist()320%n/a118811
setUserProperty_shouldModifyPropertyWithGivenKeyAndValueWhenKeyAlreadyExists()320%n/a118811
removeUserProperty_shouldRemoveUserPropertyForGivenUserAndKey()310%n/a118811
getUsers_shouldMatchSearchToFamilyName2()290%n/a117711
changeHashedPassword_shouldChangeTheHashedPasswordForTheGivenUser()280%n/a117711
changeQuestionAnswer_shouldChangeTheSecretQuestionAndAnswerForGivenUser()270%n/a117711
retireUser_shouldRetireUserAndSetAttributes()270%n/a118811
saveUser_shouldUpdateUsersUsername()260%n/a118811
unretireUser_shouldUnretireAndUnmarkAllAttributes()250%n/a118811
getUsers_shouldReturnUsersWhoseRolesInheritRequestedRoles()240%n/a115511
getUsers_shouldNotFailIfRolesAreSearchedButNameIsEmpty()220%n/a115511
getUserByUuid_shouldFetchUserWithGivenUuid()210%n/a117711
getUsersByName_shouldFetchUsersExactlyMatchingTheGivenGivenNameAndFamilyName()210%n/a117711
getUsersByName_shouldNotFetchAnyDuplicateUsers()210%n/a117711
shouldFetchNamesForPersonsThatWereFirstFetchedAsUsers()190%n/a115511
getUsersByPerson_shouldFetchAllAccountsForAPersonWhenIncludeRetiredIsTrue()190%n/a115511
getUsersByPerson_shouldNotFetchRetiredAccountsWhenIncludeRetiredIsFalse()190%n/a115511
changePassword_shouldBeAbleToUpdatePasswordMultipleTimes()180%n/a116611
getUserByUsername_shouldGetUserByUsername()180%n/a115511
getUsersByName_shouldFetchVoidedUsersWhenincludeVoidedIsTrue()180%n/a115511
getUsersByName_shouldNotFetchAnyVoidedUsersWhenIncludeVoidedIsFalse()180%n/a115511
getUsers_shouldFetchUsersWithAtLeastOneOfTheGivenRoleObjects()180%n/a114411
getUsers_shouldFetchAllUsersIfNameSearchIsEmptyOrNull()170%n/a113311
removeUserProperty_shouldThrowErrorWhenUserIsNotAuthorizedToEditUsers()170%n/a116611
savePrivilege_shouldSaveGivenPrivilegeToTheDatabase()170%n/a115511
changeQuestionAnswer_shouldMatchOnCorrectlyHashedStoredPassword()160%n/a117711
changeQuestionAnswer_shouldMatchOnIncorrectlyHashedStoredPassword()160%n/a117711
changePassword_shouldMatchOnIncorrectlyHashedSha1StoredPassword()150%n/a117711
changePassword_shouldMatchOnCorrectlyHashedSha1StoredPassword()150%n/a117711
changePassword_shouldMatchOnSha512HashedPassword()150%n/a117711
purgeRole_shouldDeleteGivenRoleFromDatabase()150%n/a115511
purgeUser_shouldDeleteGivenUserWhenCascadeEqualsFalse()150%n/a114411
setUserProperty_shouldThrowErrorWhenUserIsNotAuthorizedToEditUsers()150%n/a115511
saveRole_shouldSaveGivenRoleToTheDatabase()150%n/a114411
getPrivilegeByUuid_shouldFindObjectGivenValidUuid()140%n/a115511
getUsers_shouldNotFetchDuplicateUsers()140%n/a114411
isSecretAnswer_shouldReturnTrueWhenGivenAnswerMatchesStoredSecretAnswer()140%n/a114411
purgeUser_shouldDeleteGivenUser()140%n/a114411
getUsersByRole_shouldFetchUsersAssignedGivenRole()130%n/a113311
getUsersByRole_shouldNotFetchUserThatDoesNotBelongToGivenRole()130%n/a113311
getUserByUuid_shouldFindObjectGivenValidUuid()120%n/a114411
getPrivilege_shouldFetchPrivilegeForGivenName()120%n/a114411
getRole_shouldFetchRoleForGivenRoleName()120%n/a114411
getRoleByUuid_shouldFindObjectGivenValidUuid()110%n/a114411
changePassword_shouldChangePasswordForTheGivenUserAndPassword()110%n/a114411
getAllPrivileges_shouldReturnAllPrivilegesInTheSystem()110%n/a114411
getAllRoles_shouldReturnAllRolesInTheSystem()110%n/a114411
getAllUsers_shouldNotContainsAnyDuplicateUsers()110%n/a114411
getUser_shouldFetchUserWithGivenUserId()110%n/a113311
isSecretAnswer_shouldReturnFalseWhenGivenAnswerDoesNotMatchTheStoredSecretAnswer()110%n/a113311
purgePrivilege_shouldDeleteGivenPrivilegeFromTheDatabase()110%n/a113311
purgeUser_shouldThrowAPIExceptionIfCascadeIsTrue()100%n/a113311
getUsers_shouldFetchUsersWithNameThatContainsGivenNameSearch()90%n/a112211
getUsers_shouldFetchUsersWithSystemIdThatContainsGivenNameSearch()90%n/a112211
getUsers_shouldFetchVoidedUsersIfIncludedVoidedIsTrue()90%n/a112211
getUsers_shouldNotFetchVoidedUsersIfIncludedVoidedIsFalse()90%n/a112211
purgeRole_shouldThrowErrorWhenRoleIsACoreRole()90%n/a113311
removeUserProperty_shouldReturnNullIfUserIsNull()90%n/a113311
setUserProperty_shouldReturnNullIfUserIsNull()90%n/a113311
getAllUsers_shouldFetchAllUsersInTheSystem()80%n/a113311
purgePrivilege_shouldThrowErrorWhenPrivilegeIsCorePrivilege()70%n/a112211
getPrivilegeByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid()50%n/a112211
getRoleByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid()50%n/a112211
getUserByUuid_shouldReturnNullIfNoObjectFoundWithGivenUuid()50%n/a112211
purgeRole_shouldReturnIfRoleIsNull()40%n/a112211
UserServiceTest()30%n/a111111
logOutAfterThisTest()20%n/a112211
saveRole_shouldThrowErrorIfRoleInheritsFromItself()0%n/a111111