本文整理汇总了C#中SmtpResponse.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# SmtpResponse.Equals方法的具体用法?C# SmtpResponse.Equals怎么用?C# SmtpResponse.Equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SmtpResponse
的用法示例。
在下文中一共展示了SmtpResponse.Equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Equals_is_false_ResponseCode_doesnt_match
public void Equals_is_false_ResponseCode_doesnt_match()
{
var response1 = new SmtpResponse(250, "");
var response2 = new SmtpResponse(251, "");
Assert.False(response1.Equals(response2));
Assert.False(response1.Equals((object)response2));
Assert.NotEqual(response1.GetHashCode(), response2.GetHashCode());
}
示例2: Equals_is_false_Additional_missing_in_other_response
public void Equals_is_false_Additional_missing_in_other_response()
{
var response1 = new SmtpResponse(250, "", new[] { "line" });
var response2 = new SmtpResponse(250, "");
Assert.False(response1.Equals(response2));
Assert.False(response1.Equals((object)response2));
}
示例3: Equals_is_true_when_everything_matches
public void Equals_is_true_when_everything_matches()
{
var response1 = new SmtpResponse(250, "same", new[] { "line" });
var response2 = new SmtpResponse(250, "same", new[] { "line" });
Assert.True(response1.Equals(response2));
Assert.True(response1.Equals((object)response2));
Assert.Equal(response1.GetHashCode(), response2.GetHashCode());
}