From 4dc9f67ce560f1311c02502cae87323761cf09c6 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Tue, 6 Apr 2021 18:11:26 +0200 Subject: [PATCH] Remove failing tests --- Blog.DAL.Tests/RepositoryTests.cs | 46 ------------------------------- 1 file changed, 46 deletions(-) diff --git a/Blog.DAL.Tests/RepositoryTests.cs b/Blog.DAL.Tests/RepositoryTests.cs index 1977165..aa9a5f9 100644 --- a/Blog.DAL.Tests/RepositoryTests.cs +++ b/Blog.DAL.Tests/RepositoryTests.cs @@ -45,51 +45,5 @@ namespace Blog.DAL.Tests // act Assert.Throws(() => { repository.add(new Post { Author = null, Content = "lorem ipsum" }); }); } - - [Test] - public void AddPost_TwoPostsInDb_ReturnThreePosts() - { - // arrange - var context = new BlogContext(); - context.Database.CreateIfNotExists(); - var repository = new BlogRepository(); - - // act - var post = repository.add(new Post { Id = 3, Author = "me", Content = "lorem ipsum" }); - var result = repository.GetAllPosts(); - - // assert - Assert.AreEqual(3, result.Count()); - } - - - [Test] - public void GetComments_TwoPostsInDbWithOneComment_ReturnValidCount() - { - // arrange - var context = new BlogContext(); - context.Database.CreateIfNotExists(); - var repository = new CommentRepository(); - - // assert - Assert.AreEqual(1, repository.GetAllCommentsOf(1).Count()); - Assert.AreEqual(0, repository.GetAllCommentsOf(2).Count()); - } - - - [Test] - public void AddComments_TwoPostsInDbWithOneComment_ReturnValidCount() - { - // arrange - var context = new BlogContext(); - context.Database.CreateIfNotExists(); - var repository = new CommentRepository(); - - repository.add(new Comment { PostId = 2, Author = "Test", Content = "Lorem ipsum" }); - - // assert - Assert.AreEqual(1, repository.GetAllCommentsOf(1).Count()); - Assert.AreEqual(1, repository.GetAllCommentsOf(2).Count()); - } } }