Skip to content

11.06 happy and lovely homework-pengyu #6

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mechcodeman
Copy link

No description provided.

company?.Employees.Remove(employee);
return NoContent();
}
[HttpPost("{companyId}/employees")]

Choose a reason for hiding this comment

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

suggestion: add new line to separate two methods

@falconwoo
Copy link

to be improved: missing api design for employee

@jingwang315
Copy link

Good points:

  1. Commit step by step.
  2. Valid name for test method.
  3. Good implementation which meets requirement.

To be improved:
The first test method should be check again.

CreateCompanyRequest companyGiven = new CreateCompanyRequest("BlueSky Digital Media");
HttpResponseMessage postResponseMessage = await httpClient.PostAsJsonAsync("/api/companies", companyGiven);
var createdCompany = await postResponseMessage.Content.ReadFromJsonAsync<Company>();
var createdEmployee = new EmployeeRequest("pengyu");

Choose a reason for hiding this comment

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

Suggestion: use givenEmployee when creating an employee request; use createdEmployee read from postResponseMessage because that's successfully created.

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.

3 participants