Пример #1
0
        public void ConstructorSetsViewLocationExpanderAndType()
        {
            // Arrange
            var expander = new TestViewLocationExpander();

            // Act
            var descriptor = new ViewLocationExpanderDescriptor(expander);

            // Assert
            Assert.Same(expander, descriptor.Instance);
            Assert.Equal(expander.GetType(), descriptor.OptionType);
        }
Пример #2
0
        public void ConstructorSetsViewLocationExpanderType()
        {
            // Arrange
            var type = typeof(TestViewLocationExpander);

            // Act
            var descriptor = new ViewLocationExpanderDescriptor(type);

            // Assert
            Assert.Equal(type, descriptor.OptionType);
            Assert.Null(descriptor.Instance);
        }