public void Combine_NullOrNullTemplateReflectedAttributeRouteModels( AttributeRouteModel left, AttributeRouteModel right) { // Arrange & Act var combined = AttributeRouteModel.CombineAttributeRouteModel(left, right); // Assert Assert.Null(combined); }
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); }
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); }
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); }
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); }