Exemplo n.º 1
0
        public void Combine_NullOrNullTemplateReflectedAttributeRouteModels(
            AttributeRouteModel left,
            AttributeRouteModel right)
        {
            // Arrange & Act
            var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right);

            // Assert
            Assert.Null(combined);
        }
Exemplo n.º 2
0
        public void Combine_Names(
            AttributeRouteModel left,
            AttributeRouteModel right,
            string expectedName)
        {
            // Arrange & Act
            var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right);

            // Assert
            Assert.NotNull(combined);
            Assert.Equal(expectedName, combined.Name);
        }
Exemplo n.º 3
0
        public void Combine_ValidReflectedAttributeRouteModels(
            AttributeRouteModel left,
            AttributeRouteModel right,
            AttributeRouteModel expectedResult)
        {
            // Arrange & Act
            var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right);

            // Assert
            Assert.NotNull(combined);
            Assert.Equal(expectedResult.Template, combined.Template);
        }
Exemplo n.º 4
0
        public void Combine_Orders(
            AttributeRouteModel left,
            AttributeRouteModel right,
            int?expected)
        {
            // Arrange & Act
            var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right);

            // Assert
            Assert.NotNull(combined);
            Assert.Equal(expected, combined.Order);
        }
Exemplo n.º 5
0
        public void Combine_RightOverridesReflectedAttributeRouteModel(
            AttributeRouteModel left,
            AttributeRouteModel right)
        {
            // Arrange
            var expectedTemplate = AttributeRouteModel.CombineTemplates(null, right.Template);

            // Act
            var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right);

            // Assert
            Assert.NotNull(combined);
            Assert.Equal(expectedTemplate, combined.Template);
            Assert.Equal(combined.Order, right.Order);
        }