Skip to content

Conversation

@Ateeb020301
Copy link

No description provided.

ArrayList<String> bagels;
int capacity = 2;
public Basket(){
this.bagels = new ArrayList<>(capacity);
Copy link
Contributor

Choose a reason for hiding this comment

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

As I said in this morning's session it's best not to hard code example data into your code, do it in the tests instead.

int updateCap=10;
String returnV = basket.removeBagelString("bagel10");
Assertions.assertEquals("The bagel " + "bagel10" + " doesn't exist",returnV);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This test appears to start off with the intention of updating the capacity but then ends up with code that tries to remove an non-existent bagel from the basket.

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.

2 participants