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

11 Networking.Persistence Module with DAO abstract class, implementations and builder #15

Merged
merged 23 commits into from
Apr 1, 2024

Conversation

SverreNystad
Copy link
Owner

@SverreNystad SverreNystad commented Mar 13, 2024

The network.persistence module

This PR adds the following to the project:

  • DAO Abstract base class
  • DAOBuilder for creation of DAOs
  • FirebaseDAO for multiplayer (NOT YET IMPLEMENTED)
  • LocalDAO for singleplay (NOT YET IMPLEMENTED)
  • MockDAO used for testing

There are also tests for this functionality

To run all the tests:

gradlew test

@SverreNystad SverreNystad linked an issue Mar 13, 2024 that may be closed by this pull request
7 tasks
@SverreNystad SverreNystad self-assigned this Mar 13, 2024
@SverreNystad SverreNystad linked an issue Mar 13, 2024 that may be closed by this pull request
4 tasks
@SverreNystad SverreNystad added the enhancement New feature or request label Mar 13, 2024
@SverreNystad
Copy link
Owner Author

SverreNystad commented Mar 13, 2024

Found a tutorial on how to add firebase. So I can probably set it up later today

@SverreNystad SverreNystad marked this pull request as ready for review March 14, 2024 12:53
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rename this to LocalDAO or StorageDAO? More descriptive than MockDAO, especially if it's going to be used for tests.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or i don't see the reason to test something that won't be used, if that makes sense

@Before
public void setUp() {
// dao with all capabilities
mockDAO = new MockDAO<>(true, true, true, true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this standard, why can't we enforce/expect all the CRUD-operations to be implemented?

Copy link
Collaborator

@Artewald Artewald 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 :D

@Artewald Artewald merged commit 259b9cb into main Apr 1, 2024
4 checks passed
@Artewald Artewald deleted the 11-create-networking-system branch April 1, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create the DAO submodule Create Networking System
4 participants