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

Ivanchuk/Child refactor #165

Merged
merged 5 commits into from
Jun 29, 2021
Merged

Ivanchuk/Child refactor #165

merged 5 commits into from
Jun 29, 2021

Conversation

v-ivanchuk
Copy link
Contributor

Task #153

{
this.ValidateId(id, localizer);

var children = await service.GetAllByParent(id).ConfigureAwait(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to implement checkout whether ParentId belongs to User, who called method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dear @OlhaHoliak,
Thank you a lot for your advice. I think it is a good idea, so I have implemented it.
Please review.
Thank you a lot.


// Assert
Assert.That(result, Is.Not.Null);
Assert.AreEqual(200, result.StatusCode);

Choose a reason for hiding this comment

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

would be nice to use constants for 200 and 204 status code))
cold use this Assert.IsNotNull(result); for isnot null check))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dear @yfedo,
Thank you a lot for your advice. I have implemented them in the current PR.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

86.7% 86.7% Coverage
0.0% 0.0% Duplication

@v-ivanchuk v-ivanchuk requested a review from OlhaHoliak June 25, 2021 11:06
@v-ivanchuk v-ivanchuk merged commit 9f0f657 into develop Jun 29, 2021
@v-ivanchuk v-ivanchuk deleted the Ivanchuk/ChildRefactor branch July 12, 2021 13:57
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.

Refactor relationship between parent and child
3 participants