public void TestArticleTitleAlreadyExists_WithNonExistingData_ShouldReturnFalse(string data) { var repository = new Mock <IDeletableEntityRepository <Article> >(); repository.Setup(r => r.All()).Returns(new List <Article>() { new Article { Title = "Some Title" }, new Article { Title = "Second Title" }, }.AsQueryable()); var service = new ArticlesService(repository.Object, new ImageService()); Assert.False(service.ArticleTitleAlreadyExists(data)); }