Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
98 0 0 0 100% 2,746 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
org.mybatis.jpetstore.web.controllers 40 0 0 0 100% 0,461 s
org.mybatis.jpetstore.domain 10 0 0 0 100% 0,177 s
org.mybatis.jpetstore.web.configuration 2 0 0 0 100% 0,002 s
org.mybatis.jpetstore.service 21 0 0 0 100% 0,750 s
org.mybatis.jpetstore.mapper 25 0 0 0 100% 1,356 s

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

org.mybatis.jpetstore.web.controllers

- Class Tests Errors Failures Skipped Success Rate Time
AccountControllerTest 11 0 0 0 100% 0,208 s
CartControllerTest 12 0 0 0 100% 0,170 s
CatalogControllerTest 7 0 0 0 100% 0,018 s
OrderControllerTest 9 0 0 0 100% 0,063 s
RootControllerTest 1 0 0 0 100% 0,002 s

org.mybatis.jpetstore.domain

- Class Tests Errors Failures Skipped Success Rate Time
CartTest 8 0 0 0 100% 0,150 s
OrderTest 2 0 0 0 100% 0,027 s

org.mybatis.jpetstore.web.configuration

- Class Tests Errors Failures Skipped Success Rate Time
StaxFactoryInitializationListenerTest 2 0 0 0 100% 0,002 s

org.mybatis.jpetstore.service

- Class Tests Errors Failures Skipped Success Rate Time
AccountServiceTest 6 0 0 0 100% 0,559 s
CatalogServiceTest 9 0 0 0 100% 0,099 s
OrderServiceTest 6 0 0 0 100% 0,092 s

org.mybatis.jpetstore.mapper

- Class Tests Errors Failures Skipped Success Rate Time
AccountMapperTest 8 0 0 0 100% 1,232 s
CategoryMapperTest 2 0 0 0 100% 0,013 s
ItemMapperTest 4 0 0 0 100% 0,049 s
LineItemMapperTest 2 0 0 0 100% 0,012 s
OrderMapperTest 4 0 0 0 100% 0,025 s
ProductMapperTest 3 0 0 0 100% 0,015 s
SequenceMapperTest 2 0 0 0 100% 0,010 s

Test Cases

[Summary] [Package List] [Test Cases]

CartTest

addItemWhenIsInStockIsFalse 0,112 s
removeItemByIdWhenItemFound 0,010 s
setQuantityByItemId 0,001 s
removeItemByIdWhenItemNotFound 0 s
getSubTotalWhenItemIsEmpty 0,001 s
getSubTotalWhenItemIsExist 0,001 s
incrementQuantityByItemId 0,001 s
addItemWhenIsInStockIsTrue 0,001 s

OrderTest

getFormattedOrderDate 0,005 s
initOrder 0,019 s

AccountMapperTest

updateProfile 0,108 s
getAccountByUsername 0,015 s
insertAccount 0,005 s
updateSignon 0,004 s
insertProfile 0,004 s
getAccountByUsernameAndPassword 0,005 s
insertSignon 0,003 s
updateAccount 0,003 s

CategoryMapperTest

getCategoryList 0,004 s
getCategory 0,003 s

ItemMapperTest

updateInventoryQuantity 0,023 s
getInventoryQuantity 0,005 s
getItem 0,008 s
getItemListByProduct 0,005 s

LineItemMapperTest

getLineItemsByOrderId 0,004 s
insertLineItem 0,004 s

OrderMapperTest

insertOrderStatus 0,004 s
insertOrder 0,004 s
getOrdersByUsername 0,006 s
getOrder 0,004 s

ProductMapperTest

getProduct 0,003 s
searchProductList 0,005 s
getProductListByCategory 0,003 s

SequenceMapperTest

updateSequence 0,003 s
getSequence 0,003 s

AccountServiceTest

shouldNotCallTheMapperToUpdateSignonWhenPasswordIsEmpty 0,541 s
shouldNotCallTheMapperToUpdateSignonWhenPasswordIsNull 0,002 s
shouldCallTheMapperToUpdateAnAccount 0,002 s
shouldCallTheMapperToGetAccountAnUsername 0,007 s
shouldCallTheMapperToGetAccountAnUsernameAndPassword 0,002 s
shouldCallTheMapperToInsertAnAccount 0,001 s

CatalogServiceTest

shouldReturnItemList 0,084 s
shouldReturnCategoryList 0,002 s
shouldCallTheSearchMapperTwice 0,002 s
shouldReturnItem 0,001 s
shouldReturnProduct 0,002 s
shouldReturnProductList 0,002 s
shouldReturnFalseWhenNotExistStock 0,001 s
shouldReturnCategory 0,002 s
shouldReturnTrueWhenExistStock 0,001 s

OrderServiceTest

shouldReturnNextId 0,076 s
shouldThrowExceptionWhenSequenceNotFound 0,005 s
shouldReturnOrderWhenGivenOrderIdExistedLineItems 0,002 s
shouldCallTheMapperToInsert 0,003 s
shouldReturnOrderList 0,002 s
shouldReturnOrderWhenGivenOrderIdWithOutLineItems 0,001 s

StaxFactoryInitializationListenerTest

contextInitializedSetsStaxFactoryProperties 0,001 s
contextDestroyedDoesNothing 0 s

AccountControllerTest

signoffInvalidatesSessionAndRedirectsToCatalog 0,155 s
editAccountFormWithoutSessionReturnsEditAccountViewWithoutAccount 0,007 s
editAccountFormWithSessionReturnsEditAccountViewWithAccount 0,007 s
signonFormReturnsSignonView 0,003 s
newAccountFormReturnsNewAccountView 0,002 s
signonWithInvalidCredentialsReturnsSignonView 0,006 s
editAccountRedirectsToEditPageNotCatalog 0,007 s
newAccountRedirectsToCatalogWithoutLoggingIn 0,002 s
signonWithValidCredentialsRedirects 0,002 s
accountSessionIsNotAuthenticatedWithNullAccount 0,003 s
accountSessionIsAuthenticatedWithValidAccount 0,003 s

CartControllerTest

addItemWithNullIdReturnsError 0,003 s
removeItemWithExistingIdRemovesItemFromCart 0,003 s
viewCartReturnsCartView 0,003 s
updateCartQuantitiesIgnoresInvalidNumericInput 0,132 s
addItemWithNewIdFetchesItemFromCatalogAndAddsToCart 0,002 s
updateCartQuantitiesRemovesItemWhenQuantityLessThanOne 0,002 s
updateCartQuantitiesUpdatesQuantity 0,003 s
checkOutReturnsCheckoutViewWithCartFromSession 0,002 s
addItemWithExistingIdIncrementsQuantityWithoutCallingCatalog 0,003 s
removeItemWithNullIdReturnsError 0,002 s
removeItemWithNonExistentIdReturnsError 0,002 s
checkOutWithNoExistingCartCreatesNewCartInSession 0,004 s

CatalogControllerTest

viewItemPopulatesModelWithItemAndProduct 0,002 s
viewMainReturnsCorrectView 0,002 s
searchProductsWithValidKeyword 0,003 s
viewProductWithValidIdPopulatesModel 0,003 s
viewProductWithNullIdDoesNotPopulateModel 0,002 s
viewCategoryWithValidId 0,003 s
searchProductsWithNullKeyword 0,002 s

OrderControllerTest

listOrdersWithoutAuthReturnsError 0,037 s
viewOrderWithoutAuthRedirects 0,003 s
newOrderFormWithAuthAndCartReturnsNewOrderView 0,003 s
listOrdersWithAuthReturnsOrderList 0,003 s
confirmOrderUsesBillingAddressFromSession 0,003 s
viewOrderWithAuthButDifferentUsernameReturnsError 0,003 s
viewOrderWithAuthAndMatchingUsernameReturnsViewOrder 0,003 s
newOrderFormWithoutAuthRedirects 0,002 s
shippingFormSubmissionDoesNotOverwriteBillingFields 0,002 s

RootControllerTest

redirectToHomeReturnsRedirectToIndex 0,001 s