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

PC-851: Add tests to independently document local authority information #256

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

jamiehumphries
Copy link
Contributor

No description provided.

const string fieldName = nameof(LocalAuthorityDetails.Status);
foreach (var (code, status) in expectedStatusesByCode)
{
using var _ = new AssertionScope($"{fieldName} for LA with code \"{code}\"");
Copy link
Contributor Author

@jamiehumphries jamiehumphries Feb 16, 2024

Choose a reason for hiding this comment

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

These assertion scopes mean that the error messages give you details about where in the foreach loop the test failed.

For example:

Expected Status for LA with code "1150" to be Hug2Status.Pending {value: 1}, but found Hug2Status.Live {value: 2}.

rather than just:

Expected localAuthority.Status to be Hug2Status.Live {value: 2}, but found Hug2Status.Pending {value: 1}.

* The longer term ideal state would be to move this data into the database, but these tests provide a defensive
* mitigation until that is possible.
*
* For full details, see the report attached to: https://beisdigital.atlassian.net/browse/PC-851
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This report isn't attached yet, but will be once it is finalised.

@jamiehumphries jamiehumphries changed the title PC-851: Add tests to independtly document local authority information PC-851: Add tests to independently document local authority information Feb 16, 2024
@jamiehumphries jamiehumphries merged commit a154bfd into develop Feb 16, 2024
1 check passed
@jamiehumphries jamiehumphries deleted the PC-851 branch February 16, 2024 16:36
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