KinsonDigital / Velaptor

2D game development framework
https://docs.velaptor.io
MIT License
71 stars 20 forks source link

🚧Refactor moq code to nsubstitute #1005

Closed CalvinWilkinson closed 2 months ago

CalvinWilkinson commented 2 months ago

Complete The Item Below

Description

Refactor the following test files from Moq code to NSubstitute code

  1. MouseTests.cs
  2. MeasureTextBenchmarks.cs
  3. CachedValueTests.cs
  4. AtlasLoaderTests.cs
  5. AudioLoaderTests.cs
  6. TextureCacheTests.cs
  7. AudioFactoryTests.cs
  8. FontFactoryTests.cs
  9. FontLoaderTests.cs
  10. FontStatsServiceTests.cs
  11. ImageServiceTests.cs
  12. LoggingServiceTests.cs

Acceptance Criteria

### The items to complete to satisfy the Definition of Done.
- [ ] All the unit tests have been executed and passed locally after PR work is complete. _(Why? Refer to 'Additional Information' below.)_
- [x] The file _**MouseTests.cs**_ has been refactored
- [x] The file _**MeasureTextBenchmarks.cs**_ has been refactored
- [x] The file _**CachedValueTests.cs**_ has been refactored
- [x] The file _**AtlasLoaderTests.cs**_ has been refactored
- [x] The file _**AudioLoaderTests.cs**_ has been refactored
- [x] The file _**TextureCacheTests.cs**_ has been refactored
- [x] The file _**AudioFactoryTests.cs**_ has been refactored
- [x] The file _**FontFactoryTests.cs**_ has been refactored
- [x] The file _**FontLoaderTests.cs**_ has been refactored
- [x] The file _**FontStatsServiceTests.cs**_ has been refactored
- [x] The file _**ImageServiceTests.cs**_ has been refactored
- [x] The file _**LoggingServiceTests.cs**_ has been refactored

ToDo Items

### The items to complete to satisfy the Definition of Done.
- [x] Add a change type label to the issue.  Refer to the _**Change Type Labels**_ section below.
- [x] Add a priority label to the issue.  Refer to the _**Priority Type Labels**_ section below.
- [x] Link the issue to the correct milestone _(if applicable)_.

Issue Dependencies

No response

Related Work

No response

Additional Information:

Unit Tests

Reasons for local unit test execution:

  • Unit tests might pass locally but not in the CI environment during the status check process or vice-versa.
  • Tests might pass on the developer's machine but not necessarily on the code reviewer's machine.
  • If you notice that the test status check has passed but the test failed locally, please notify a project maintainer!

💡Warning💡 If the unit tests pass remotely and are not executed locally, this means we could be letting a bug slip into production. Though bugs will always exist in some capacity, we should all do our part to help prevent them from happening.

Change Type Labels

Change Type Label
Bug Fixes 🐛bug
Breaking Changes 🧨breaking-changes
New Feature ✨new-feature
CICD Changes ♻️cicd
Config Changes ⚙️config
Performance Improvements 🏎️performance
Code Doc Changes 🗒️documentation/code
Product Doc Changes 📝documentation/product

Priority Type Labels

Priority Type Label
Low Priority low priority
Medium Priority medium priority
High Priority high priority

Code of Conduct