Skip to content

ereldebel/oop-ex2-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

OOP Ex2 Tests

featured in Exercise 2 of the new "Introduction to OOP" course, HUJI, Winter 2021-2022 Semester.
Written by Erel Debel.

↓↓ Instructions at the bottom ↓↓

Important info about CleverPlayerTest and SnartypamtsPlayerTest:

Pay attention to the documentation. without any change these classes solely test using the current Board.SIZE and Board.WIN_STREAK values. As documented in these classes it is recommended you temporarily remove the final modifiers from these constant and uncomment the test methods in these classes for a full test of the wanted Win/Lose ratio.

The test support the printing in Tournament.playTournament as defined in the forum: "=== player 1: %d | player 2: %d | Draws: %d ===\r"

========================================================================================

The tests can be configured and run by:

  1. Put the test directory, testSrc, in your project directory (in the same directory as "src" and "out"):

    img_1.png

  2. Open the project in IntelliJ if you haven't yet.

  3. Right-click the testSrc directory and choose
    Mark Directory as -> Test Sources Root:

    img_2.png

  4. Open the file BoardTest.java inside the testSrc directory.

  5. On the first line' hover mouse over the red text and press Alt+Enter:

    img_3.png

  6. Then choose JUnit 5:

    img_4.png

  7. Right-click testSrc directory or press Ctrl+Shift+F10 to run all tests:

    img_5.png

Good luck!
Erel

About

Tests for Exercise 2 of the new "Introduction to OOP" course, HUJI, Winter 2021-2022 Semester.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages