Skip to content

kailin MiniBlog #1

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 11 commits into
base: main
Choose a base branch
from
Open

Conversation

lklgithub
Copy link

No description provided.

@mechcodeman
Copy link

well

  • using DI containers to register all sinlge and scoped dependencies.
  • All tests left pass.
  • three layers implemented.

to be improved

  • need add a test case when getById.
  • existing test when delete article should not be delete.


namespace MiniBlog.Repositories
{
public class UserRepository : IUserRepository

Choose a reason for hiding this comment

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

well: nice to also provide repository for user

mockUserRepository.Setup(repository => repository.GetUserByName(It.IsAny<string>())).ReturnsAsync((User)null);
mockUserRepository.Setup(repository => repository.CreateUser(It.IsAny<User>())).ReturnsAsync((User user) => user);

//var articleStore = new ArticleStore();

Choose a reason for hiding this comment

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

suggestion: remove dead code

await userResponseAfterDeletion.Content.ReadAsStringAsync());
Assert.True(usersLeft.Count == 0);
}
//[Fact]

Choose a reason for hiding this comment

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

suggestion: remove dead code

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