Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
258 0 0 0 100% 17.90 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.054 s
com.student_loan.unit.controller 107 0 0 0 100% 0.638 s
com.student_loan.unit.config 13 0 0 0 100% 4.891 s
com.student_loan 1 0 0 0 100% 11.01 s
com.student_loan.unit.model 37 0 0 0 100% 0.075 s
com.student_loan.unit.dtos 6 0 0 0 100% 0.132 s
com.student_loan.unit.service 90 0 0 0 100% 1.101 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.054 s

com.student_loan.unit.controller

- Class Tests Errors Failures Skipped Success Rate Time
UnitUserControllerTest 25 0 0 0 100% 0.111 s
UnitLoanControllerTest 43 0 0 0 100% 0.149 s
UnitRankingControllerTest 2 0 0 0 100% 0.036 s
UnitItemControllerTest 37 0 0 0 100% 0.342 s

com.student_loan.unit.config

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

com.student_loan

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

com.student_loan.unit.model

- Class Tests Errors Failures Skipped Success Rate Time
UnitUserTest 12 0 0 0 100% 0.029 s
UnitItemTest 12 0 0 0 100% 0.026 s
UnitLoanTest 13 0 0 0 100% 0.020 s

com.student_loan.unit.dtos

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

com.student_loan.unit.service

- Class Tests Errors Failures Skipped Success Rate Time
UnitUserServiceTest 26 0 0 0 100% 0.126 s
UnitItemServiceTest 15 0 0 0 100% 0.380 s
UnitLoanServiceTest 45 0 0 0 100% 0.515 s
NotificationServiceTests 2 0 0 0 100% 0.073 s
UnitRankingServiceTest 2 0 0 0 100% 0.007 s

Test Cases

[Summary] [Package List] [Test Cases]

DtoTests

testRegistrationRecord 0.070 s
testLoanRecord 0.006 s
testCredentialsDTO 0.001 s
testUserRecord 0.006 s
testRankingDTO 0.001 s
testItemRecord 0.012 s

UnitUserServiceTest

testLogin_StoresTokenOnSuccess 0.043 s
testUpdateUser_PenaltiesDecrease_NoEmail 0.003 s
testUpdateUser_PasswordNull_KeepsOldPassword 0.003 s
testGetUserByEmail 0.003 s
testGetUserByToken 0.002 s
testGetUserByIdFound 0.002 s
testUpdateUser_PenaltiesEqual_NoEmail 0.002 s
testDeleteUser_Success 0.003 s
testUpdateUser_UserExistsFull 0.004 s
testUpdateUser_PenaltiesIncrementByOne_TriggersEmail 0.004 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.002 s
testUpdateUser_PenaltiesNull_NoEmail 0.003 s
testUpdateUser_NegativePenalties_NoEmail 0.002 s
testLogoutFailure 0.001 s
testRegister_UserAlreadyExists 0.002 s
testLogin_InvalidPassword 0.004 s
testGetAllUsersReturnsList 0.003 s
testGetUserByIdNotFound 0.002 s
testUpdateUser_UserExistsPartial 0.003 s
testUpdateUser_PenaltiesIncrease_TriggersEmail 0.003 s
testUpdateUser_UserDoesNotExist 0.003 s

UnitItemServiceTest

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

UnitLoanServiceTest

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

NotificationServiceTests

testEnviarCorreo_Success 0.068 s
testEnviarCorreo_ExceptionHandled 0.003 s

UnitConfigTest

testBCryptPasswordEncoderBean 3.678 s
testDoFilterInternal_withValidToken_setsAuthentication 0.511 s
testCorsConfigurationSourceBeanExists 0.087 s
testTestSecurityConfigBeans 0.084 s
testSecurityFilterChainBeanExists 0.065 s
testDoFilterInternal_withoutBearerHeader_skipsAuthentication 0.004 s
testGenerateTokenAndExtractEmail 0.248 s
testCorsConfigurationSourceSettings 0.059 s
testCorsConfigurerBeanExists 0.031 s
testDoFilterInternal_withNonBearerHeader_skipsAuthentication 0.003 s
testValidateInvalidToken 0.004 s
testDoFilterInternal_withInvalidToken_skipsAuthentication 0.003 s
testAddCorsMappings 0.099 s

DataInitializerTest

testInitData_RunsSuccessfullyAndSavesEntities 0.041 s
testSaveItems_DoesNotSaveWhenExisting 0.004 s
testSaveUsers_DoesNotSaveWhenExisting 0.003 s
testSaveLoans_DoesNotSaveWhenActiveLoanExists 0.002 s

UnitUserTest

testGetSetDegreeType 0.001 s
testGetUserById_NotFound 0.001 s
testAddUser 0.001 s
testGetSetAdmin 0 s
testToStringIncludesAllFields 0.010 s
testUpdateUserName 0.001 s
testHasPenalty 0 s
testDeleteUser 0.002 s
testGetUserById 0.002 s
testGetSetPassword 0.001 s
testUpdateUserEmail 0.001 s
testUpdateUserPhoneNumber 0.001 s

UnitRankingServiceTest

testGetRanking_EmptyList 0.004 s
testGetRanking_ReturnsRankingList 0.002 s

UnitItemTest

testUpdateItemCategory 0.001 s
testGetItemById 0.001 s
testAddItem 0.001 s
testGetSetPurchaseDate 0.001 s
testToStringIncludesAllFields 0.008 s
testUpdateItemDescription 0.001 s
testGetSetItemCondition 0.001 s
testUpdateItemStatus 0.001 s
testGetSetItemImage 0 s
testDeleteItem 0.001 s
testUpdatePurchasePrice 0.001 s
testGetItemById_NotFound 0.002 s

UnitLoanTest

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

UnitUserControllerTest

testUserToUserRecord_FullName 0.002 s
testLogin_Success 0.001 s
testRegister_Duplicate 0.001 s
testDeleteUser_AsAdmin 0.001 s
testGetUserRecordById_NotFound 0.004 s
testUserToUserRecord_SingleName 0.001 s
testGetAllUsers_Unauthorized 0.001 s
testLogout_InvalidToken 0.001 s
testUpdateUser_AsAdmin 0.002 s
testUpdateUser_NotFound 0.002 s
testUpdateUser_InvalidToken 0.063 s
testUpdateUser_Unauthorized 0.002 s
testRegister_Success 0.001 s
testDeleteUser_Self 0.001 s
testGetAllUsers_NonAdminUnauthorized 0.001 s
testGetAllUsers_AdminSuccess 0.002 s
testGetUserRecordById_Unauthorized 0.001 s
testDeleteUser_InvalidToken 0.002 s
testUpdateUser_Self 0.001 s
testDeleteUser_Unauthorized 0.001 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

StudentLoanManagementApplicationTest

contextLoads 0.018 s

UnitLoanControllerTest

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

UnitRankingControllerTest

getAllRankings_Success 0.032 s
getAllRankings_EmptyList 0.001 s

UnitItemControllerTest

createItemWithToken_BadRequestOnError 0.247 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.002 s
deleteItem_SuccessAdmin 0.002 s
deleteItem_SuccessOwner 0.002 s
updateItem_SaveThrows 0.002 s
updateItem_OwnerSuccess 0.001 s
deleteItem_ItemMissing_AdminOk 0.002 s
getLentItems_Unauthorized 0.002 s
deleteItem_ItemMissing_NonAdminThrows 0.002 s
getItemById_Success 0.002 s
update_InvalidStatus_ThrowsException 0.003 s
getBorrowedItems_Error 0.002 s
updateItem_AdminSuccess 0.002 s
updateItem_ItemNotFound 0.002 s
createItem_Success 0.004 s
updateItem_NotOwnerNorAdmin 0.002 s
getLentItems_Error 0.002 s
deleteItem_NotOwnerNorAdmin 0.002 s
createItem_BadRequestOnError 0.003 s
getBorrowedItems_Success 0.003 s
getItemById_Forbidden 0.002 s
getItemsByUser_Success 0.002 s
getAllItems_Unauthorized 0.002 s
deleteItem_NoUser_Unauthorized 0.002 s
getItemById_UnauthorizedOrMissing 0.002 s
createItemWithToken_Unauthorized 0.001 s
deleteItem_Exception 0.002 s
getItemsByUser_BadRequest 0.002 s
getItemsByUser_Unauthorized 0.002 s