public async Task IsByUSerShouldReturnFalseWhenArticleByTheSpecificUserDoesNotExist() { // Arrange this.driver = new FakeDbContextDriver(ArticleConstants.IsByUserTrueDbName, (int)ArticleConstants.GetArticlesNum); // Act this.articleId = (int)ArticleConstants.GetArticlesNum; this.userId = ArticleConstants.IsByUserFalseUserId; bool exists = await this.driver .ArticleService .IsByUser(this.articleId, this.userId); // Assert Assert.False(exists); }
public async Task IsByUSerShouldReturnTrueWhenArticleByUserExists() { // Arrange this.driver = new FakeDbContextDriver(ArticleConstants.IsByUserTrueDbName, (int)ArticleConstants.GetArticlesNum); // Act this.articleId = 1; this.userId = (string)ArticleConstants.GetArticlesNum; bool exists = await this.driver .ArticleService .IsByUser(this.articleId, this.userId); // Assert Assert.True(exists); }