public void Blog_Instantiation_Test()
        {
            var blog = new Blog
            {
                Id = 1,
                Name = "MyBlog",
                Posts = new List<Post>
                {
                    new Post
                    {
                        Blog = new Blog(),
                        Id = 10,
                        BlogId = 20,
                        Content = "Content Goes Here",
                        Title = "Title"
                    }
                }
            };

            Assert.That(blog.Posts.Count > 0, Is.True);
            Assert.That(blog.Id == 1, Is.True);
            Assert.That(blog.Name.Equals("MyBlog", StringComparison.OrdinalIgnoreCase));

            Assert.That(blog.ToString(), Is.EqualTo("Id:1, Name:MyBlog"));
        }
        public void SaveBlog_Test()
        {
            var database = new BlogsManager();
            database.Truncate();
            var blog = new Blog {Name = "Test Blog"};
            var initialCount = database.Count();

            try
            {
                TransactionHelper.Begin(() => database.Save(blog));
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            var finalCount = database.Count();

            Assert.That(finalCount == ++initialCount);
        }