Skip to content

Build/63 build create basic tests#71

Merged
WilliamTjonndal merged 25 commits intomainfrom
build/63-build-create-basic-tests
Apr 20, 2025
Merged

Build/63 build create basic tests#71
WilliamTjonndal merged 25 commits intomainfrom
build/63-build-create-basic-tests

Conversation

@WilliamTjonndal
Copy link
Copy Markdown
Collaborator

@WilliamTjonndal WilliamTjonndal commented Apr 18, 2025

Description

Write unit tests for most classes.
Mock classes that were required:

  • MockPresenter

Related Issues

Closes #63

Changes Made

Created the following unit tests:

Model unit tests

Entities

  • BoardSquareFactoryTest
  • PieceFactoryTest

Singletons

  • GameSettingsTest
  • GameTest
  • LobbyTest

Presenter unit tests

  • PresenterManagerTest

View unit tests

  • Lwjgl3LauncherTest (tests if the desktop launcher launches successfully)

Checklist

Check applicable items

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented on my code where necessary.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@WilliamTjonndal WilliamTjonndal linked an issue Apr 18, 2025 that may be closed by this pull request
8 tasks
Copy link
Copy Markdown
Collaborator

@ChrisKrane ChrisKrane left a comment

Choose a reason for hiding this comment

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

Looks good, well done with the unit tests! I can see that ./gradlew test works great, but jacoco doesn't seem to be configured yet. Could you fix this? It should be simple enough to add to the build.gradle file in each module.
You should also update the testing section in the README when done 😄

@WilliamTjonndal
Copy link
Copy Markdown
Collaborator Author

Added Jacoco for test coverage, and updated the readme.

Copy link
Copy Markdown
Collaborator

@ChrisKrane ChrisKrane left a comment

Choose a reason for hiding this comment

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

LGTM!

@WilliamTjonndal WilliamTjonndal merged commit 3d3db6b into main Apr 20, 2025
1 check passed
@WilliamTjonndal WilliamTjonndal deleted the build/63-build-create-basic-tests branch April 20, 2025 13:33
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.

[build] Create basic unit tests

2 participants