Route mapping configuration.
Inheritance: System.Configuration.ConfigurationElement, IMapRouteConfiguration
コード例 #1
0
        public void TestContentRepositoryReturnSqlRepository()
        {
            // Arrange
            var config = new MapRouteConfiguration()
                             {
                                 RepositoryType = "sql",
                                 RepositorySource = "DefaultDatabase",
                                 RepositoryTable = "CmsContent"
                             };

            // Act
            var repo = config.ContentRepository;

            // Assert
            Assert.IsNotNull(repo);
            Assert.IsInstanceOfType(repo, typeof(SqlContentRepository));
        }
コード例 #2
0
        public void TestContentRepositoryReturnFileRepository()
        {
            // Arrange
            var config = new MapRouteConfiguration()
            {
                RepositoryType = "file",
                RepositorySource = string.Empty,
                RepositoryTable = string.Empty
            };

            // Act
            var repo = config.ContentRepository;

            // Assert
            Assert.IsNotNull(repo);
            Assert.IsInstanceOfType(repo, typeof(FileContentRepository));
        }