Пример #1
0
        public void GetViewStartLocations_ReturnsEmptySequenceIfViewPathIsEmpty(string viewPath)
        {
            // Arrange
            var appPath = @"x:\test";
            var provider = new ViewStartProvider(GetAppEnv(appPath), Mock.Of<IRazorPageFactory>());

            // Act
            var result = provider.GetViewStartLocations(viewPath);

            // Assert
            Assert.Empty(result);
        }
Пример #2
0
        public void GetViewStartLocations_ReturnsEmptySequenceIfViewPathIsEmpty(string viewPath)
        {
            // Arrange
            var appPath  = @"x:\test";
            var provider = new ViewStartProvider(GetAppEnv(appPath), Mock.Of <IRazorPageFactory>());

            // Act
            var result = provider.GetViewStartLocations(viewPath);

            // Assert
            Assert.Empty(result);
        }
Пример #3
0
        public void GetViewStartLocations_ReturnsPotentialViewStartLocations(string appPath,
                                                                             string viewPath,
                                                                             IEnumerable<string> expected)
        {
            // Arrange
            var provider = new ViewStartProvider(GetAppEnv(appPath), Mock.Of<IRazorPageFactory>());

            // Act
            var result = provider.GetViewStartLocations(viewPath);

            // Assert
            Assert.Equal(expected, result);
        }
Пример #4
0
        public void GetViewStartLocations_ReturnsPotentialViewStartLocations(string appPath,
                                                                             string viewPath,
                                                                             IEnumerable <string> expected)
        {
            // Arrange
            var provider = new ViewStartProvider(GetAppEnv(appPath), Mock.Of <IRazorPageFactory>());

            // Act
            var result = provider.GetViewStartLocations(viewPath);

            // Assert
            Assert.Equal(expected, result);
        }