public void TryMatch_ConditionalWhenPropertyName(bool isSamePropertyName, string propertName)
        {
            // Arrange
            DynamicSegmentTemplate template = new DynamicSegmentTemplate(new DynamicPathSegment("matchingproperty"));
            DynamicPathSegment     segment  = new DynamicPathSegment(propertName);

            // Act
            Dictionary <string, object> values = new Dictionary <string, object>();
            bool result = template.TryMatch(segment, values);

            // Assert
            Assert.Equal(isSamePropertyName, result);
            Assert.False(values.ContainsKey("matchingproperty"));
        }
        public void TryMatch_AlwaysTrueWhenParameterName()
        {
            // Arrange
            DynamicSegmentTemplate template = new DynamicSegmentTemplate(new DynamicPathSegment("{parameter}"));
            DynamicPathSegment     segment  = new DynamicPathSegment("property");

            // Act
            Dictionary <string, object> values = new Dictionary <string, object>();
            bool result = template.TryMatch(segment, values);

            // Assert
            Assert.True(result);
            Assert.True(values.ContainsKey("parameter"));
            Assert.Equal("property", values["parameter"]);
        }