Beispiel #1
0
        public void Category_Post_Can_Be_Removed()
        {
            var category = new Category();

            var post = new Post();

            category.AddPost(post);

            Assert.AreEqual(1, category.Posts.Count());

            Assert.AreEqual(1, post.Categories.Count());

            category.RemovePost(post);

            Assert.AreEqual(0, category.Posts.Count());

            Assert.AreEqual(0, post.Categories.Count());
        }