本文整理汇总了C#中RelativePath.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# RelativePath.Equals方法的具体用法?C# RelativePath.Equals怎么用?C# RelativePath.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RelativePath
的用法示例。
在下文中一共展示了RelativePath.Equals方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RelativePath_Unit_Equals3_ObjIsNonEqualString
public void RelativePath_Unit_Equals3_ObjIsNonEqualString()
{
String[] nodes = new String[] { "sites", "Chad", "Greer" };
Char separator = RelativePath.ForwardSlash;
RelativePath target = new RelativePath(nodes, separator);
String other = nodes.Select(node => node.ToUpperInvariant()).ToArray().Join(separator);
Boolean actual = target.Equals(other);
Assert.AreEqual(false, actual);
}
示例2: RelativePath_Unit_Equals3_ObjIsNull
public void RelativePath_Unit_Equals3_ObjIsNull()
{
String[] nodes = new String[] { "sites", "Chad", "Greer" };
Char separator = RelativePath.ForwardSlash;
RelativePath target = new RelativePath(nodes, separator);
String other = null;
Boolean actual = target.Equals(other);
Assert.AreEqual(false, actual);
}
示例3: RelativePath_Unit_Equals2_UnequivalentRelativePath2
public void RelativePath_Unit_Equals2_UnequivalentRelativePath2()
{
String[] nodes = new String[] { "sites", "Chad", "Greer" };
RelativePath target = new RelativePath(nodes, RelativePath.ForwardSlash);
RelativePath other = new RelativePath(nodes, RelativePath.Backslash);
Boolean actual = target.Equals(other);
Assert.AreEqual(false, actual);
}
示例4: RelativePath_Unit_Equals2_ObjIsSameReference
public void RelativePath_Unit_Equals2_ObjIsSameReference()
{
String[] nodes = new String[] { "sites", "Chad", "Greer" };
Char separator = RelativePath.ForwardSlash;
RelativePath target = new RelativePath(nodes, separator);
RelativePath other = target;
Boolean actual = target.Equals(other);
Assert.AreEqual(true, actual);
}
示例5: RelativePath_Unit_Equals1_UnequivalentRelativePath3
public void RelativePath_Unit_Equals1_UnequivalentRelativePath3()
{
String[] nodes = new String[] { "sites", "Chad", "Greer" };
RelativePath target = new RelativePath(nodes, RelativePath.ForwardSlash);
Object obj = new RelativePath(nodes.Concat(new String[] { "test" }).ToArray(), RelativePath.Backslash);
Boolean actual = target.Equals(obj);
Assert.AreEqual(false, actual);
}
示例6: RelativePath_Unit_Equals1_UnequivalentRelativePath1
public void RelativePath_Unit_Equals1_UnequivalentRelativePath1()
{
String[] nodes = new String[] { "sites", "Chad", "Greer" };
Char separator = RelativePath.ForwardSlash;
RelativePath target = new RelativePath(nodes, separator);
Object obj = new RelativePath(nodes.Select(node => node.ToUpperInvariant()).ToArray(), separator);
Boolean actual = target.Equals(obj);
Assert.AreEqual(false, actual);
}
示例7: RelativePath_Unit_Equals1_ObjIsEqualString
public void RelativePath_Unit_Equals1_ObjIsEqualString()
{
String[] nodes = new String[] { "sites", "Chad", "Greer" };
Char separator = RelativePath.ForwardSlash;
RelativePath target = new RelativePath(nodes, separator);
Object obj = nodes.Join(separator);
Boolean actual = target.Equals(obj);
Assert.AreEqual(true, actual);
}