当前位置: 首页>>代码示例>>C#>>正文


C# RelativePath.Equals方法代码示例

本文整理汇总了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);
        }
开发者ID:cegreer,项目名称:Common,代码行数:10,代码来源:RelativePathTests.cs

示例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);
        }
开发者ID:cegreer,项目名称:Common,代码行数:10,代码来源:RelativePathTests.cs

示例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);
        }
开发者ID:cegreer,项目名称:Common,代码行数:9,代码来源:RelativePathTests.cs

示例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);
        }
开发者ID:cegreer,项目名称:Common,代码行数:10,代码来源:RelativePathTests.cs

示例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);
        }
开发者ID:cegreer,项目名称:Common,代码行数:9,代码来源:RelativePathTests.cs

示例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);
        }
开发者ID:cegreer,项目名称:Common,代码行数:10,代码来源:RelativePathTests.cs

示例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);
        }
开发者ID:cegreer,项目名称:Common,代码行数:10,代码来源:RelativePathTests.cs


注:本文中的RelativePath.Equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。