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

Chore/Create mock solution for reusability of unittest mocks and data #448

Merged
merged 5 commits into from
Jun 27, 2023

Conversation

allinox
Copy link
Contributor

@allinox allinox commented Jun 27, 2023

Description

This PR rips the Mock and Mock-data parts out of the test project and establishes a new project solution 'Mocks'. Mocks is then used by Tests for unit testing as previously, but can now also be reused during runtime in Dev whenever UseMockData is set in appsettings.Development.json

This can be benefitial when developing frontend code for backend endpoints that are not yet created, or are for some reason unavailable or broken. It also lessens the need for setup (souch as Database setup and policy files in Azure) before a developer can begin coding in frontend.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@github-actions github-actions bot added the kind/chore Create a none user-story issue (chore, tech issue, backend issue) label Jun 27, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 27, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability E 1 Vulnerability
Security Hotspot A 0 Security Hotspots
Code Smell A 47 Code Smells

82.7% 82.7% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@allinox allinox merged commit dad8296 into main Jun 27, 2023
3 of 4 checks passed
@allinox allinox deleted the chore/445-move-mock-clients branch June 27, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/chore Create a none user-story issue (chore, tech issue, backend issue)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants