Exists() public method

Check for exist of content.
public Exists ( ContentModel content ) : bool
content ContentModel The content - requires host, path, and name property.
return bool
        public void TestExistsFindFileOnSystem()
        {
            // Arrange
            var repo =
                new FileContentRepository(System.IO.Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "CmsContent"));

            // Act
            var result = repo.Exists(new ContentModel() { Host = "localhost", Path = "/ArticleTitle" });

            // Assert
            Assert.IsTrue(result);
        }
        public void TestDeleteFile()
        {
            // Arrange
            var repo =
                new FileContentRepository(System.IO.Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "CmsContent"));
            var model = new ContentModel() { Host = "localhost", Path = "/test/test/article" };

            // Act
            repo.Remove(model);
            var result = repo.Exists(model);

            // Assert
            Assert.IsFalse(result);
        }