Save() public method

Saves the specified content.
public Save ( ContentModel content ) : void
content ContentModel The content - requires host, path, and name property.
return void
        public void TestSaveNewContentToFile()
        {
            // Arrange
            var repo =
                new FileContentRepository(System.IO.Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "CmsContent"));

            // Act
            var result = repo.Retrieve(new ContentModel() { Host = "localhost", Path = "/test/test/article-title" });
            repo.Save(
                    new ContentModel()
                        {
                            Host = "localhost",
                            Path = "/test/test/article-title",
                            Data = System.Text.Encoding.UTF8.GetBytes("test")
                        });

            var result2 = repo.Retrieve(new ContentModel() { Host = "localhost", Path = "/test/test/article-title" });

            // Assert
            Assert.IsNotNull(result.SetDataFromStream().Data);
            Assert.IsNotNull(result2.SetDataFromStream().Data);
            Assert.AreNotEqual(result.Data, result2.Data);
        }