Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tested shopping cart functionality #19

Merged
merged 9 commits into from
Oct 27, 2023

Conversation

ivan0dyatlyukkk
Copy link
Owner

image

Copy link

@andrii-hoienko andrii-hoienko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GJ! Let`s improve your solution

void findById_withValidId_returnsCartItem() {
CartItem actualCartItem = cartItemRepository.findById(TEST_VALID_CART_ITEM_ID).get();

assertNotNull(actualCartItem.getShoppingCart());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that is it enough to assert that shopping cart is not null, maybe makes sence to check content of cart?And actually make sure that you have at least one tets which checks content of something that you receive

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not resolved, at least in CartControllerTest you don`t have assert where content of cart is checked fullt

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are completely right, sorry, I added it to the next method and forgot to add to this one

Copy link

@andrii-hoienko andrii-hoienko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are not fully resolved

void findById_withValidId_returnsCartItem() {
CartItem actualCartItem = cartItemRepository.findById(TEST_VALID_CART_ITEM_ID).get();

assertNotNull(actualCartItem.getShoppingCart());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not resolved, at least in CartControllerTest you don`t have assert where content of cart is checked fullt

@ivan0dyatlyukkk ivan0dyatlyukkk merged commit 25b75d9 into main Oct 27, 2023
2 checks passed
@ivan0dyatlyukkk ivan0dyatlyukkk deleted the test-shopping-cart-functionality branch November 4, 2023 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants