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 ability to set the instance of ProjectContext and initialize it manually #33

Merged
merged 2 commits into from
May 19, 2022

Conversation

pnarimani
Copy link

Some unit tests require specific settings for ProjectContext. The current implementation of ProjectContext doesn't allow initialization any other way that having the prefab with exact name in resources folder.

This makes it impossible to have two unit tests which need two different versions of ProjectContext.

With this change, it's possible to set the ProjectContext instance manually and call Initialize.

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • No compiler errors or warnings

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Does this introduce a breaking change?

  • Yes
  • No

pnarimani added 2 commits May 14, 2022 03:01
… manually.

This is useful for unit tests where you need specific settings for ProjectContext for a specific unit test
Copy link
Owner

@Mathijs-Bakker Mathijs-Bakker left a comment

Choose a reason for hiding this comment

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

Nice!

@Mathijs-Bakker Mathijs-Bakker merged commit eb99860 into Mathijs-Bakker:master May 19, 2022
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