Skip to content

feat: add error code to result #38

feat: add error code to result

feat: add error code to result #38

GitHub Actions / DotNET Tests succeeded Sep 8, 2024 in 0s

38 passed, 0 failed and 0 skipped

Tests passed successfully

✅ test/TestResults/test-results.trx

38 tests were completed in 1s with 38 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
test.Application.UnitTests.Services.DomainService.AccountServiceTests 6✅ 278ms
test.Application.UnitTests.Services.DomainService.ProfileServiceTests 11✅ 243ms
test.Application.UnitTests.Services.DomainService.TransactionServiceTests 10✅ 301ms
test.Application.UnitTests.Services.DomainService.UserServiceTests 11✅ 276ms

✅ test.Application.UnitTests.Services.DomainService.AccountServiceTests

✅ AddAccountsFromCsvAsync_WhenCsvIsValid_ReturnsOk
✅ AddAccountsFromCsvAsync_WhenExceptionIsThrown_ReturnsFail
✅ GetAccountByIdAsync_WhenAccountDoesNotExist_ReturnsNull
✅ GetAccountByIdAsync_WhenAccountExists_ReturnsAccount
✅ GetAllAccountsAsync_WhenAccountsExist_ReturnsListOfAccounts
✅ GetAllAccountsAsync_WhenExceptionIsThrown_ReturnsFail

✅ test.Application.UnitTests.Services.DomainService.ProfileServiceTests

✅ ChangePassword_WhenChangePasswordFails_ReturnsFail
✅ ChangePassword_WhenCurrentPasswordIsIncorrect_ReturnsFail
✅ ChangePassword_WhenSuccess_ReturnsOk
✅ ChangePassword_WhenUserNotFound_ReturnsFail
✅ EditProfileInfo_WhenAllDataIsChangedCorrectly_ReturnsOk
✅ EditProfileInfo_WhenUpdateFails_ReturnsFail
✅ EditProfileInfo_WhenUsernameIsNoChanged_ReturnsOk
✅ EditProfileInfo_WhenUsernameIsReserved_ReturnsFail
✅ EditProfileInfo_WhenUserNotFound_ReturnsFail
✅ GetProfileInfo_WhenSuccess_ReturnsOk
✅ GetProfileInfo_WhenUserNotFound_ReturnsFail

✅ test.Application.UnitTests.Services.DomainService.TransactionServiceTests

✅ AddTransactionsFromCsvAsync_ShouldOnlyAddNewTransactions_WhenSomeTransactionsAlreadyExist
✅ AddTransactionsFromCsvAsync_ShouldReturnFail_WhenExceptionIsThrown
✅ AddTransactionsFromCsvAsync_ShouldReturnOk_WhenTransactionsAreAddedSuccessfully
✅ GetAllTransactionsAsync_ShouldReturnAllTransactions
✅ GetAllTransactionsAsync_ShouldReturnEmptyList_WhenNoTransactionsAreFound
✅ GetAllTransactionsAsync_ShouldReturnFailResult_WhenExceptionIsThrown
✅ GetTransactionsByAccountIdAsync_ShouldReturnEmptyList_WhenNoTransactionsAreFound
✅ GetTransactionsByAccountIdAsync_ShouldReturnFailResult_WhenExceptionIsThrown
✅ GetTransactionsByAccountIdAsync_ShouldReturnOkResult_WhenThereAreMultipleTransactionsBetweenTwoAccounts
✅ GetTransactionsByAccountIdAsync_ShouldReturnOkResult_WhenTransactionsAreRetrievedAndGroupedSuccessfully

✅ test.Application.UnitTests.Services.DomainService.UserServiceTests

✅ ChangeRole_WhenOperationSucceeds_ReturnsSuccessResult
✅ ChangeRole_WhenRoleDoesNotExist_ReturnsFailResult
✅ ChangeRole_WhenUserDoesNotExist_ReturnsFailResult
✅ GetUsersAsync_ReturnsUserListWithRoles
✅ Login_WhenLoginSucceeds_ReturnsSuccessResult
✅ Login_WhenPasswordIncorrect_ReturnsFailResult
✅ Login_WhenUsernameNotFound_ReturnsFailResult
✅ SignUpUser_WhenRoleAssignmentFails_ReturnsFailResult
✅ SignUpUser_WhenRoleDoesNotExist_ReturnsFailResult
✅ SignUpUser_WhenUserCreationFails_ReturnsFailResult
✅ SignUpUser_WhenUserIsCreatedAndRoleAssignedSuccessfully_ReturnsSuccessResult