Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
258 0 0 0 100% 17.48 s

Note: failures are anticipated and checked for with assertions while errors are unanticipated.


Package List

[Summary] [Package List] [Test Cases]


Package Tests Errors Failures Skipped Success Rate Time
com.student_loan.unit 4 0 0 0 100% 0.067 s
com.student_loan.unit.controller 107 0 0 0 100% 0.819 s
com.student_loan.unit.config 13 0 0 0 100% 1.318 s
com.student_loan 1 0 0 0 100% 13.07 s
com.student_loan.unit.model 37 0 0 0 100% 1.157 s
com.student_loan.unit.service 90 0 0 0 100% 1.003 s
com.student_loan.unit.dtos 6 0 0 0 100% 0.047 s

Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.

com.student_loan.unit

- Class Tests Errors Failures Skipped Success Rate Time
DataInitializerTest 4 0 0 0 100% 0.067 s

com.student_loan.unit.controller

- Class Tests Errors Failures Skipped Success Rate Time
UnitItemControllerTest 37 0 0 0 100% 0.468 s
UnitUserControllerTest 25 0 0 0 100% 0.139 s
UnitRankingControllerTest 2 0 0 0 100% 0.046 s
UnitLoanControllerTest 43 0 0 0 100% 0.166 s

com.student_loan.unit.config

- Class Tests Errors Failures Skipped Success Rate Time
UnitConfigTest 13 0 0 0 100% 1.318 s

com.student_loan

- Class Tests Errors Failures Skipped Success Rate Time
StudentLoanManagementApplicationTest 1 0 0 0 100% 13.07 s

com.student_loan.unit.model

- Class Tests Errors Failures Skipped Success Rate Time
UnitLoanTest 13 0 0 0 100% 0.208 s
UnitItemTest 12 0 0 0 100% 0.157 s
UnitUserTest 12 0 0 0 100% 0.792 s

com.student_loan.unit.service

- Class Tests Errors Failures Skipped Success Rate Time
UnitUserServiceTest 26 0 0 0 100% 0.200 s
UnitRankingServiceTest 2 0 0 0 100% 0.007 s
NotificationServiceTests 2 0 0 0 100% 0.150 s
UnitLoanServiceTest 45 0 0 0 100% 0.596 s
UnitItemServiceTest 15 0 0 0 100% 0.050 s

com.student_loan.unit.dtos

- Class Tests Errors Failures Skipped Success Rate Time
DtoTests 6 0 0 0 100% 0.047 s

Test Cases

[Summary] [Package List] [Test Cases]

UnitUserServiceTest

testLogin_StoresTokenOnSuccess 0.098 s
testUpdateUser_PenaltiesDecrease_NoEmail 0.004 s
testUpdateUser_PasswordNull_KeepsOldPassword 0.004 s
testGetUserByEmail 0.003 s
testGetUserByToken 0.002 s
testGetUserByIdFound 0.003 s
testUpdateUser_PenaltiesEqual_NoEmail 0.004 s
testDeleteUser_Success 0.002 s
testUpdateUser_UserExistsFull 0.003 s
testUpdateUser_PenaltiesIncrementByOne_TriggersEmail 0.005 s
testLogin_UserAlreadyLoggedIn 0.003 s
testRegister_UserDoesNotExist 0.003 s
testLogin_UserExists 0.003 s
testLogin_UserNotFound 0.003 s
testDeleteUser_NotFound 0.003 s
testLogoutSuccess 0.003 s
testUpdateUser_PenaltiesNull_NoEmail 0.004 s
testUpdateUser_NegativePenalties_NoEmail 0.005 s
testLogoutFailure 0.003 s
testRegister_UserAlreadyExists 0.002 s
testLogin_InvalidPassword 0.002 s
testGetAllUsersReturnsList 0.002 s
testGetUserByIdNotFound 0.003 s
testUpdateUser_UserExistsPartial 0.004 s
testUpdateUser_PenaltiesIncrease_TriggersEmail 0.006 s
testUpdateUser_UserDoesNotExist 0.004 s

DataInitializerTest

testInitData_RunsSuccessfullyAndSavesEntities 0.052 s
testSaveItems_DoesNotSaveWhenExisting 0.003 s
testSaveUsers_DoesNotSaveWhenExisting 0.003 s
testSaveLoans_DoesNotSaveWhenActiveLoanExists 0.003 s

UnitConfigTest

testBCryptPasswordEncoderBean 0.161 s
testDoFilterInternal_withValidToken_setsAuthentication 0.363 s
testCorsConfigurationSourceBeanExists 0.078 s
testTestSecurityConfigBeans 0.092 s
testSecurityFilterChainBeanExists 0.062 s
testDoFilterInternal_withoutBearerHeader_skipsAuthentication 0.002 s
testGenerateTokenAndExtractEmail 0.368 s
testCorsConfigurationSourceSettings 0.057 s
testCorsConfigurerBeanExists 0.009 s
testDoFilterInternal_withNonBearerHeader_skipsAuthentication 0.001 s
testValidateInvalidToken 0.003 s
testDoFilterInternal_withInvalidToken_skipsAuthentication 0.002 s
testAddCorsMappings 0.111 s

UnitRankingServiceTest

testGetRanking_EmptyList 0.003 s
testGetRanking_ReturnsRankingList 0.002 s

UnitItemControllerTest

createItemWithToken_BadRequestOnError 0.333 s
getAvailableItems_Unauthorized 0.003 s
createItemWithToken_Success 0.005 s
getAvailableItems_Success 0.004 s
getBorrowedItems_Unauthorized 0.003 s
createItem_Unauthorized 0.003 s
getLentItems_Success 0.006 s
getAllItems_Success 0.003 s
updateItem_TokenInvalid 0.003 s
update_PartialFields_OK 0.004 s
deleteItem_SuccessAdmin 0.003 s
deleteItem_SuccessOwner 0.003 s
updateItem_SaveThrows 0.003 s
updateItem_OwnerSuccess 0.003 s
deleteItem_ItemMissing_AdminOk 0.003 s
getLentItems_Unauthorized 0.003 s
deleteItem_ItemMissing_NonAdminThrows 0.003 s
getItemById_Success 0.002 s
update_InvalidStatus_ThrowsException 0.003 s
getBorrowedItems_Error 0.003 s
updateItem_AdminSuccess 0.003 s
updateItem_ItemNotFound 0.003 s
createItem_Success 0.004 s
updateItem_NotOwnerNorAdmin 0.003 s
getLentItems_Error 0.003 s
deleteItem_NotOwnerNorAdmin 0.002 s
createItem_BadRequestOnError 0.004 s
getBorrowedItems_Success 0.003 s
getItemById_Forbidden 0.003 s
getItemsByUser_Success 0.003 s
getAllItems_Unauthorized 0.003 s
deleteItem_NoUser_Unauthorized 0.002 s
getItemById_UnauthorizedOrMissing 0.003 s
createItemWithToken_Unauthorized 0.002 s
deleteItem_Exception 0.003 s
getItemsByUser_BadRequest 0.002 s
getItemsByUser_Unauthorized 0.002 s

UnitLoanTest

testAddLoan 0.152 s
testGetEstimatedReturnDate 0.001 s
testGetLoanById 0.003 s
testToStringIncludesAllFields 0.017 s
testUpdateLoanBorrower 0.003 s
testGetSetObservations 0.001 s
testDeleteLoan 0.002 s
testGetLoanById_NotFound 0.003 s
testGetSetRating 0.001 s
testUpdateRealReturnDate 0.002 s
testGetSetLoanDate 0.001 s
testUpdateLoanRating 0.002 s
testUpdateLoanStatus 0.002 s

NotificationServiceTests

testEnviarCorreo_Success 0.133 s
testEnviarCorreo_ExceptionHandled 0.011 s

UnitLoanServiceTest

testGetBorrowedItemsIdByUser 0.179 s
testSaveLoanUpdateExistingLoanSkipsLimitCheck 0.009 s
testSaveLoanLenderOptEmpty 0.007 s
testGetLentItemsIdByUser 0.006 s
testSaveLoanBorrowerNotFound 0.024 s
testSaveLoanItemNotFound 0.007 s
testCreateLoanAlreadyExists 0.005 s
testCreateLoan_NonInUseSkipsLimit 0.123 s
testCreateLoanItemFindByIdNull 0.006 s
testReturnLoan_BorrowerMissing_NoNotifications 0.007 s
testReturnLoanSuccess 0.007 s
testGetAllLoans 0.005 s
testGetLoansByLender 0.004 s
testSaveLoanLenderOptNull 0.004 s
testGetLoanById 0.004 s
testSaveLoanSuccess 0.005 s
testSaveLoanBorrowerUnderPenaltyThrows 0.015 s
testReturnLoanNotFound 0.005 s
testSaveLoanNewLoanAtLimitThrows 0.006 s
testCreateLoanOverridesProvidedStatus 0.006 s
testCreateLoanBorrowerNotFound 0.005 s
testSaveLoanItemOptNull 0.006 s
testSaveLoanLenderNotFound 0.004 s
testSaveLoanBorrowerOptNull 0.004 s
testReturnLoan_MissingUser_NoNotifications 0.006 s
testReturnLoan_NotificationsSent 0.008 s
testCreateLoan_ActiveLoansLimitReached 0.006 s
testCreateLoanSuccess 0.006 s
testCreateLoanFindByIdNull 0.005 s
testSaveLoanBorrowerOptEmpty 0.004 s
testCreateLoanFindByIdNullSkipsExistingCheck 0.004 s
testReturnLoanSaveThrowsException 0.004 s
testSaveLoanItemOptEmpty 0.005 s
testCreateLoanLenderNotFound 0.004 s
testCreateLoanLenderFindByIdNull 0.004 s
testDeleteLoan 0.003 s
testSaveLoanNewLoanBelowLimit 0.004 s
testCreateLoanBorrowerFindByIdNull 0.005 s
testCreateLoan_BorrowerUnderPenalty 0.005 s
testSaveLoanNewLoanWithDifferentStatusSkipsLimit 0.005 s
testCreateLoanFindByIdEmptySkipsExistingCheck 0.005 s
testCreateLoanItemNotFound 0.005 s
testGetLoansByBorrower 0.004 s
testCreateLoan_ActiveLoansUnderLimit 0.005 s
testReturnLoanOptionalNull 0.003 s

UnitItemTest

testUpdateItemCategory 0.127 s
testGetItemById 0.003 s
testAddItem 0.002 s
testGetSetPurchaseDate 0.001 s
testToStringIncludesAllFields 0.003 s
testUpdateItemDescription 0.001 s
testGetSetItemCondition 0.001 s
testUpdateItemStatus 0.002 s
testGetSetItemImage 0.001 s
testDeleteItem 0.002 s
testUpdatePurchasePrice 0.002 s
testGetItemById_NotFound 0.002 s

UnitUserControllerTest

testUserToUserRecord_FullName 0.002 s
testLogin_Success 0.001 s
testRegister_Duplicate 0.001 s
testDeleteUser_AsAdmin 0.002 s
testGetUserRecordById_NotFound 0.002 s
testUserToUserRecord_SingleName 0.002 s
testGetAllUsers_Unauthorized 0.002 s
testLogout_InvalidToken 0.002 s
testUpdateUser_AsAdmin 0.002 s
testUpdateUser_NotFound 0.002 s
testUpdateUser_InvalidToken 0.076 s
testUpdateUser_Unauthorized 0.002 s
testRegister_Success 0.002 s
testDeleteUser_Self 0.002 s
testGetAllUsers_NonAdminUnauthorized 0.002 s
testGetAllUsers_AdminSuccess 0.003 s
testGetUserRecordById_Unauthorized 0.003 s
testDeleteUser_InvalidToken 0.002 s
testUpdateUser_Self 0.002 s
testDeleteUser_Unauthorized 0.001 s
testLogout_Success 0.001 s
testLogin_Fail 0.002 s
testGetUserById_Unauthorized 0.002 s
testGetUserById_Success 0.003 s
testGetUserRecordById_Success 0.002 s

UnitItemServiceTest

testGetItemsById_EmptyInput 0.003 s
testGetItemsByUser_UserExists 0.003 s
testCreateItem_Success 0.003 s
testGetItemsByUser_UserDoesNotExist 0.003 s
testGetAllItems 0.002 s
testGetAvailableItems 0.002 s
testCreateItem_OwnerNotFound 0.003 s
testSaveItem_Success 0.002 s
testDeleteItem 0.002 s
testGetItemsById_MixedFoundAndNotFound 0.003 s
testGetItemById_ItemNotFound 0.002 s
testCreateItem_ItemAlreadyExists 0.002 s
testSaveItem_UserNotFound 0.003 s
testGetItemsByAvailability 0.003 s
testGetItemById_ItemFound 0.003 s

UnitUserTest

testGetSetDegreeType 0.614 s
testGetUserById_NotFound 0.090 s
testAddUser 0.028 s
testGetSetAdmin 0.002 s
testToStringIncludesAllFields 0.021 s
testUpdateUserName 0.002 s
testHasPenalty 0.001 s
testDeleteUser 0.006 s
testGetUserById 0.004 s
testGetSetPassword 0.002 s
testUpdateUserEmail 0.002 s
testUpdateUserPhoneNumber 0.002 s

UnitRankingControllerTest

getAllRankings_Success 0.042 s
getAllRankings_EmptyList 0.001 s

UnitLoanControllerTest

deleteLoan_missingLoan_exception 0.005 s
getLoanById_lender_success 0.004 s
deleteLoan_admin_success 0.004 s
createLoan_unauthorized 0.003 s
getLoanById_admin_success 0.003 s
createLoan_badRequest 0.017 s
deleteLoan_notFoundException 0.005 s
getLoanById_notFound 0.003 s
createLoan_success 0.004 s
deleteLoan_borrower_success 0.003 s
getAllLoans_nonAdmin_unauthorized 0.002 s
returnLoan_notFound 0.002 s
getLoansByBorrower_self_success 0.003 s
updateLoan_notFoundMissing 0.003 s
updateLoan_invalidHeader_unauthorized 0.003 s
updateLoan_noUser_unauthorized 0.003 s
updateLoan_serviceError_returnsMessage 0.003 s
updateLoan_missingHeader_unauthorized 0.002 s
getLoanById_noUser_unauthorized 0.002 s
returnLoan_success 0.002 s
getAllLoans_noUser_unauthorized 0.002 s
updateLoan_success 0.004 s
updateLoan_notFoundException 0.004 s
deleteLoan_unauthorized 0.002 s
deleteLoan_lender_success 0.003 s
getLoanById_borrower_success 0.003 s
updateLoan_unauthorizedUser 0.002 s
getLoansByLender_unauthorized 0.003 s
updateLoan_admin_success 0.003 s
getLoanById_other_unauthorized 0.003 s
getLoansByLender_notFoundException 0.003 s
updateLoan_badHeader 0.001 s
getLoansByBorrower_admin_success 0.003 s
returnLoan_unauthorized 0.002 s
getLoansByBorrower_noUser_unauthorized 0.003 s
getLoansByLender_admin_success 0.004 s
getLoansByLender_self_success 0.004 s
returnLoan_internalError 0.003 s
getAllLoans_admin_returnsLoans 0.003 s
getLoansByLender_noUser_unauthorized 0.002 s
getLoansByBorrower_unauthorized 0.003 s
deleteLoan_noUser_unauthorized 0.002 s
updateLoan_borrower_success 0.002 s

StudentLoanManagementApplicationTest

contextLoads 0.465 s

DtoTests

testRegistrationRecord 0.010 s
testLoanRecord 0.008 s
testCredentialsDTO 0.004 s
testUserRecord 0.009 s
testRankingDTO 0.002 s
testItemRecord 0.010 s