コード例 #1
0
        public void acceptlanguage___equals_override_success(string encoding)
        {
            var value = "en-US;q=0.1, es-ES; q=1, de; q=0.7, *; q=0.5";

            var header = new AcceptLanguageHeader(encoding);

            var equals = header.Equals(value);

            equals.Should().Be(true);

            equals = header.Equals(new AcceptLanguageHeader(value));
            equals.Should().Be(true);
        }
コード例 #2
0
        public void acceptlanguage___equals_overload_not_string_or_equivelent_sccess()
        {
            AcceptLanguageHeader header1 = "en-us;";
            var other = 2;

            var equals = header1.Equals(other);

            equals.Should().BeFalse();
        }
コード例 #3
0
        public void acceptlanguage___equals_overload_null_sccess()
        {
            AcceptLanguageHeader header1 = "en-us;";
            AcceptLanguageHeader header2 = null;

            var equals = header1.Equals(header2);

            equals.Should().BeFalse();
        }