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

created first version fruit-shop-tests, there is a problem with coverage #797

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yevhenkukharchuk
Copy link

No description provided.

void createReport_createdCorrectReport_Ok() {
Storage.STORAGE.put("banana", 152);
Storage.STORAGE.put("apple", 90);
String expected = "fruit,quantity" + System.lineSeparator()

Choose a reason for hiding this comment

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

let's use StrinhBuilder

}

@Test
void processing_successProcessedSupllyOperation_Ok() {

Choose a reason for hiding this comment

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

in this case, you don't need to test in this style. I think that one test with different types of operations is enough for you and expect that no error occurs

@Test
void writeToFile_correctWrittenReport_Ok() {
String pathToFile = "src/main/resources/report.csv";
String expected = "fruit,quantity" + System.lineSeparator()

Choose a reason for hiding this comment

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

let's use StringBuilder. Same in other cases

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