Ejemplo n.º 1
0
        public void acceptcharset___equals_override_success(string charset)
        {
            string value = $"iso-8859-1;q=0.1, utf-8; q=1, us-ascii; q=0.7, *; q=0.5";

            var header = new AcceptCharsetHeader(charset);

            var equals = header.Equals(value);

            equals.Should().Be(true);

            equals = header.Equals(new AcceptCharsetHeader(value));
            equals.Should().Be(true);
        }
Ejemplo n.º 2
0
        public void acceptcharset___equals_overload_not_string_or_equivelent_sccess()
        {
            AcceptCharsetHeader header1 = "en-us;";
            var other = 2;

            var equals = header1.Equals(other);

            equals.Should().BeFalse();
        }
Ejemplo n.º 3
0
        public void acceptcharset___equals_overload_null_sccess()
        {
            AcceptCharsetHeader header1 = "en-us;";
            AcceptCharsetHeader header2 = null;

            var equals = header1.Equals(header2);

            equals.Should().BeFalse();
        }