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

Added tests #794

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlexRosenkreuz
Copy link

Created tests for fruitshop.

Copy link

@RomanYuzviak RomanYuzviak left a comment

Choose a reason for hiding this comment

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

You can correct a few common mistakes

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

public class FruitShopTest {

Choose a reason for hiding this comment

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

}

@Test
public void testReadData_Ok() {

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

The same about all other methods, there should be 3 parts in each name

@Test
public void testGenerateEmptyReport_Ok() {
ReportService reportService = new ReportServiceImpl(FRUIT_STORAGE_DAO);
String expectedReport = "fruit,quantity\n";

Choose a reason for hiding this comment

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

I think you should use System.lineSeparator() instead of \n.

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