本文整理汇总了C#中System.DomainName.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# DomainName.Equals方法的具体用法?C# DomainName.Equals怎么用?C# DomainName.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.DomainName
的用法示例。
在下文中一共展示了DomainName.Equals方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DomainName_Unit_Equals3_OtherIsUnequivalentString
public void DomainName_Unit_Equals3_OtherIsUnequivalentString()
{
String firstLevelLabel = "com";
String secondLevelLabel = "vizistata";
String subDomainLabel = "www";
DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
String other = new String[] { subDomainLabel, secondLevelLabel, firstLevelLabel }.Join(String.Empty);
Boolean actual = target.Equals(other);
Assert.IsFalse(actual);
}
示例2: DomainName_Unit_Equals2_OtherIsUnequivalentDomainName4
public void DomainName_Unit_Equals2_OtherIsUnequivalentDomainName4()
{
String firstLevelLabel = "com";
String secondLevelLabel = "vizistata";
DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, "www");
DomainName other = new DomainName(firstLevelLabel, secondLevelLabel, "deepblue", "something");
Boolean actual = target.Equals(other);
Assert.IsFalse(actual);
}
示例3: DomainName_Unit_Equals3_OtherIsNull
public void DomainName_Unit_Equals3_OtherIsNull()
{
String firstLevelLabel = "com";
String secondLevelLabel = "vizistata";
String subDomainLabel = "www";
DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
String other = null;
Boolean actual = target.Equals(other);
Assert.IsFalse(actual);
}
示例4: DomainName_Unit_Equals2_OtherIsUnequivalentDomainName1
public void DomainName_Unit_Equals2_OtherIsUnequivalentDomainName1()
{
String secondLevelLabel = "vizistata";
String subDomainLabel = "www";
DomainName target = new DomainName("com", secondLevelLabel, subDomainLabel);
DomainName other = new DomainName("net", secondLevelLabel, subDomainLabel);
Boolean actual = target.Equals(other);
Assert.IsFalse(actual);
}
示例5: DomainName_Unit_Equals2_OtherIsUnequivalentDomainName2
public void DomainName_Unit_Equals2_OtherIsUnequivalentDomainName2()
{
String firstLevelLabel = "com";
String subDomainLabel = "www";
DomainName target = new DomainName(firstLevelLabel, "vizistata", subDomainLabel);
DomainName other = new DomainName(firstLevelLabel, "google", subDomainLabel);
Boolean actual = target.Equals(other);
Assert.IsFalse(actual);
}
示例6: DomainName_Unit_Equals2_OtherIsSameAsObject
public void DomainName_Unit_Equals2_OtherIsSameAsObject()
{
String firstLevelLabel = "com";
String secondLevelLabel = "vizistata";
String subDomainLabel = "www";
DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
DomainName other = target;
Boolean actual = target.Equals(other);
Assert.IsTrue(actual);
}
示例7: DomainName_Unit_Equals2_OtherIsEquivalentDomainName
public void DomainName_Unit_Equals2_OtherIsEquivalentDomainName()
{
String firstLevelLabel = "com";
String secondLevelLabel = "vizistata";
String subDomainLabel = "www";
DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
DomainName other = new DomainName(firstLevelLabel.ToUpperInvariant(), secondLevelLabel.ToLowerInvariant(), subDomainLabel.ToUpperInvariant());
Boolean actual = target.Equals(other);
Assert.IsTrue(actual);
}
示例8: DomainName_Unit_Equals1_ObjIsUnequivalentDomainName4
public void DomainName_Unit_Equals1_ObjIsUnequivalentDomainName4()
{
String firstLevelLabel = "com";
String secondLevelLabel = "vizistata";
String subDomainLabel = "www";
DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
String [] subDomainLabels = {"deepblue", "something"};
Object obj = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabels);
Boolean actual = target.Equals(obj);
Assert.IsFalse(actual);
}
示例9: DomainName_Unit_Equals1_ObjIsUnequivalentDomainName2
public void DomainName_Unit_Equals1_ObjIsUnequivalentDomainName2()
{
String firstLevelLabel = "com";
String secondLevelLabel = "vizistata";
String subDomainLabel = "www";
DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
secondLevelLabel = "google";
Object obj = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
Boolean actual = target.Equals(obj);
Assert.IsFalse(actual);
}
示例10: DomainName_Unit_Equals1_ObjIsEquivalentString
public void DomainName_Unit_Equals1_ObjIsEquivalentString()
{
String firstLevelLabel = "com";
String secondLevelLabel = "vizistata";
String subDomainLabel = "www";
DomainName target = new DomainName(firstLevelLabel, secondLevelLabel, subDomainLabel);
Object obj = new String[] { subDomainLabel, secondLevelLabel, firstLevelLabel }.Join('.');
Boolean actual = target.Equals(obj);
Assert.IsTrue(actual);
}