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% 3.010 s
com.student_loan.unit.controller 107 0 0 0 100% 0.842 s
com.student_loan.unit.config 13 0 0 0 100% 2.005 s
com.student_loan 1 0 0 0 100% 10.89 s
com.student_loan.unit.model 37 0 0 0 100% 0.211 s
com.student_loan.unit.service 90 0 0 0 100% 0.497 s
com.student_loan.unit.dtos 6 0 0 0 100% 0.017 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% 3.010 s

com.student_loan.unit.controller

- Class Tests Errors Failures Skipped Success Rate Time
UnitRankingControllerTest 2 0 0 0 100% 0.078 s
UnitItemControllerTest 37 0 0 0 100% 0.174 s
UnitUserControllerTest 25 0 0 0 100% 0.154 s
UnitLoanControllerTest 43 0 0 0 100% 0.436 s

com.student_loan.unit.config

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

com.student_loan

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

com.student_loan.unit.model

- Class Tests Errors Failures Skipped Success Rate Time
UnitUserTest 12 0 0 0 100% 0.093 s
UnitLoanTest 13 0 0 0 100% 0.054 s
UnitItemTest 12 0 0 0 100% 0.064 s

com.student_loan.unit.service

- Class Tests Errors Failures Skipped Success Rate Time
UnitUserServiceTest 26 0 0 0 100% 0.111 s
UnitRankingServiceTest 2 0 0 0 100% 0.012 s
UnitLoanServiceTest 45 0 0 0 100% 0.247 s
NotificationServiceTests 2 0 0 0 100% 0.094 s
UnitItemServiceTest 15 0 0 0 100% 0.033 s

com.student_loan.unit.dtos

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

Test Cases

[Summary] [Package List] [Test Cases]

UnitRankingControllerTest

getAllRankings_Success 0.072 s
getAllRankings_EmptyList 0.003 s

StudentLoanManagementApplicationTest

contextLoads 0.017 s

UnitUserServiceTest

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

UnitUserTest

testGetSetDegreeType 0.010 s
testGetUserById_NotFound 0.009 s
testAddUser 0.007 s
testGetSetAdmin 0.005 s
testToStringIncludesAllFields 0.027 s
testUpdateUserName 0.003 s
testHasPenalty 0.002 s
testDeleteUser 0.004 s
testGetUserById 0.002 s
testGetSetPassword 0.001 s
testUpdateUserEmail 0.003 s
testUpdateUserPhoneNumber 0.003 s

UnitItemControllerTest

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

UnitUserControllerTest

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

UnitConfigTest

testBCryptPasswordEncoderBean 1.233 s
testDoFilterInternal_withValidToken_setsAuthentication 0.293 s
testCorsConfigurationSourceBeanExists 0.061 s
testTestSecurityConfigBeans 0.061 s
testSecurityFilterChainBeanExists 0.053 s
testDoFilterInternal_withoutBearerHeader_skipsAuthentication 0.002 s
testGenerateTokenAndExtractEmail 0.142 s
testCorsConfigurationSourceSettings 0.047 s
testCorsConfigurerBeanExists 0.016 s
testDoFilterInternal_withNonBearerHeader_skipsAuthentication 0.001 s
testValidateInvalidToken 0.004 s
testDoFilterInternal_withInvalidToken_skipsAuthentication 0.001 s
testAddCorsMappings 0.082 s

UnitLoanTest

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

UnitRankingServiceTest

testGetRanking_EmptyList 0.009 s
testGetRanking_ReturnsRankingList 0.001 s

UnitItemTest

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

UnitLoanServiceTest

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

UnitLoanControllerTest

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

NotificationServiceTests

testEnviarCorreo_Success 0.088 s
testEnviarCorreo_ExceptionHandled 0.005 s

UnitItemServiceTest

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

DataInitializerTest

testInitData_RunsSuccessfullyAndSavesEntities 2.949 s
testSaveItems_DoesNotSaveWhenExisting 0.010 s
testSaveUsers_DoesNotSaveWhenExisting 0.007 s
testSaveLoans_DoesNotSaveWhenActiveLoanExists 0.006 s

DtoTests

testRegistrationRecord 0.004 s
testLoanRecord 0.002 s
testCredentialsDTO 0.001 s
testUserRecord 0.004 s
testRankingDTO 0 s
testItemRecord 0.003 s