public void Equals_UseSameAndDifferentRanges_EqualOrNotEqualNoExceptions() { StringWithQualityHeaderValue value1 = new StringWithQualityHeaderValue("t", 0.123); StringWithQualityHeaderValue value2 = new StringWithQualityHeaderValue("t", 0.123); StringWithQualityHeaderValue value3 = new StringWithQualityHeaderValue("T", 0.123); StringWithQualityHeaderValue value4 = new StringWithQualityHeaderValue("t"); StringWithQualityHeaderValue value5 = new StringWithQualityHeaderValue("x", 0.123); StringWithQualityHeaderValue value6 = new StringWithQualityHeaderValue("t", 0.5); StringWithQualityHeaderValue value7 = new StringWithQualityHeaderValue("t", 0.1234); StringWithQualityHeaderValue value8 = new StringWithQualityHeaderValue("T"); StringWithQualityHeaderValue value9 = new StringWithQualityHeaderValue("x"); Assert.False(value1.Equals(null), "t; q=0.123 vs. <null>"); Assert.True(value1.Equals(value2), "t; q=0.123 vs. t; q=0.123"); Assert.True(value1.Equals(value3), "t; q=0.123 vs. T; q=0.123"); Assert.False(value1.Equals(value4), "t; q=0.123 vs. t"); Assert.False(value4.Equals(value1), "t vs. t; q=0.123"); Assert.False(value1.Equals(value5), "t; q=0.123 vs. x; q=0.123"); Assert.False(value1.Equals(value6), "t; q=0.123 vs. t; q=0.5"); Assert.False(value1.Equals(value7), "t; q=0.123 vs. t; q=0.1234"); Assert.True(value4.Equals(value8), "t vs. T"); Assert.False(value4.Equals(value9), "t vs. T"); }