Esempio n. 1
0
        public void Should_match_with_parameters_if_parameters_match_in_any_order()
        {
            // Given
            var range1 = new MediaRange("application/vnd.nancy;a=1;b=2");
            var range2 = new MediaRange("application/vnd.nancy;b=2;a=1");

            // Then
            range1.MatchesWithParameters(range2).ShouldBeTrue();
        }
Esempio n. 2
0
        public void Should_not_match_with_parameters_if_parameters_do_not_match()
        {
            // Given
            var range1 = new MediaRange("application/vnd.nancy;a=1;b=2");
            var range2 = new MediaRange("application/vnd.nancy;a=1;b=2;c=3");

            // Then
            range1.MatchesWithParameters(range2).ShouldBeFalse();
        }