-
Notifications
You must be signed in to change notification settings - Fork 0
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
Get by ID and Get All endpoints #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start! There are some changes that need to be made as commented, please also change all tests to use the Xunit framework. Let me know if you have any questions
TechRadarApi.Tests/V1/UseCase/GetAllTechnologiesUseCaseTests.cs
Outdated
Show resolved
Hide resolved
[Test] | ||
[Ignore("Getting a bug - can't stub the DB response")] | ||
|
||
[Fact(Skip = "Cannot mock DynamoDb context")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this test skipped? what is the issue you are facing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mockDynamoDb.Setup(x => x.ScanAsync<TechnologyDbEntity>(conditions, default).GetRemainingAsync(default))
.ThrowsAsync(exception);
This line ^ doesn't work with the scan async method as it's a 'non-virtual method'. Here's a link for more info. Should I just remove the test?
// Act | ||
var response = await Client.GetAsync(uri).ConfigureAwait(false); | ||
// Assert | ||
response.StatusCode.Should().Be(HttpStatusCode.NoContent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should change to return an 200 response
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Describe this PR
Create the 'Get All Technologies' endpoint and 'Get Technology by ID' endpoint
Checklist