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

Unit test issues #1

Closed
miccheng opened this issue Feb 24, 2021 · 1 comment
Closed

Unit test issues #1

miccheng opened this issue Feb 24, 2021 · 1 comment

Comments

@miccheng
Copy link

miccheng commented Feb 24, 2021

  1. Dead code
  1. Simplify expectation setup

    • You could construct a string instead of the heavy setup:
    String expected = "------\n" +
                "|    |\n" +
                "|    |\n" +
                "|  xx|\n" +
                "------\n";
    assertEquals(expected, actual);

    Instead of:

    String expected = render.displayGrids(expectedGrids);
    assertEquals(expected, actual);

  2. Test suites that runs multiple tests, you need to reset the canvas.

@juliatong
Copy link
Owner

updated

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

No branches or pull requests

2 participants