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


C# List.DeepEqualsSimple方法代码示例

本文整理汇总了C#中Microsoft.VisualStudio.TestTools.UnitTesting.List.DeepEqualsSimple方法的典型用法代码示例。如果您正苦于以下问题:C# List.DeepEqualsSimple方法的具体用法?C# List.DeepEqualsSimple怎么用?C# List.DeepEqualsSimple使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.VisualStudio.TestTools.UnitTesting.List的用法示例。


在下文中一共展示了List.DeepEqualsSimple方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DeepEqualsSimple_WithComparerListsOfDifferentSize_ReturnsFalse

 public void DeepEqualsSimple_WithComparerListsOfDifferentSize_ReturnsFalse()
 {
     List<string> listA = new List<string> {"a", "b", "c", "d", "e"};
     List<string> listB = new List<string> {"a", "b", "c", "d", "e", "f"};
     Assert.IsFalse(
         listA.DeepEqualsSimple(listB, StringComparer.OrdinalIgnoreCase),
         "DeepEqualsSimple should be false for lists of different length.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:8,代码来源:MiscellaneousExtensionsTests.cs

示例2: DeepEqualsSimple_WithComparerOneNull_ReturnsFalse

 public void DeepEqualsSimple_WithComparerOneNull_ReturnsFalse()
 {
     List<string> list = new List<string> {"a", "b", "c", "d", "e"};
     Assert.IsFalse(
         list.DeepEqualsSimple(null, StringComparer.OrdinalIgnoreCase),
         "DeepEqualsSimple should be false if only one list is null.");
     Assert.IsFalse(
         ((List<string>) null).DeepEqualsSimple(list, StringComparer.OrdinalIgnoreCase),
         "DeepEqualsSimple should be false if only one list is null.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:10,代码来源:MiscellaneousExtensionsTests.cs

示例3: DeepEqualsSimple_WithComparerListsOfSameSizeButOneDifferentValue_ReturnsFalse

 public void DeepEqualsSimple_WithComparerListsOfSameSizeButOneDifferentValue_ReturnsFalse()
 {
     List<string> listA = new List<string> {"a", "b", "c", "d", "e"};
     List<string> listB = new List<string> {"a", "b", "c", "z", "e"};
     Assert.IsFalse(
         listA.DeepEqualsSimple(listB, StringComparer.OrdinalIgnoreCase),
         "DeepEqualsSimple should be false for lists of identical length but with different values.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:8,代码来源:MiscellaneousExtensionsTests.cs

示例4: DeepEqualsSimple_WithComparerIdenticalLists_ReturnsTrue

 public void DeepEqualsSimple_WithComparerIdenticalLists_ReturnsTrue()
 {
     List<string> list = new List<string> {"a", "b", "c", "d", "e"};
     Assert.IsTrue(
         list.DeepEqualsSimple(list, StringComparer.OrdinalIgnoreCase),
         "DeepEqualsSimple should be true for identical lists.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:7,代码来源:MiscellaneousExtensionsTests.cs

示例5: DeepEqualsSimple_WithComparerEquivilantLists_ReturnsTrue

 public void DeepEqualsSimple_WithComparerEquivilantLists_ReturnsTrue()
 {
     List<string> list1 = new List<string> {"a", "b", "C", "D", "e"};
     List<string> list2 = new List<string> {"a", "B", "c", "d", "e"};
     Assert.IsTrue(
         list1.DeepEqualsSimple(list2, StringComparer.OrdinalIgnoreCase),
         "DeepEqualsSimple should be true for list where all items are deemed equivilant by the comparer supplied.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:8,代码来源:MiscellaneousExtensionsTests.cs

示例6: DeepEqualsSimple_ListsOfDifferentSize_ReturnsFalse

 public void DeepEqualsSimple_ListsOfDifferentSize_ReturnsFalse()
 {
     List<int> listA = new List<int> {1, 2, 3, 4, 5, 6};
     List<int> listB = new List<int> {1, 2, 3, 5, 6};
     Assert.IsFalse(
         listA.DeepEqualsSimple(listB),
         "DeepEqualsSimple should be false for lists of different length.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:8,代码来源:MiscellaneousExtensionsTests.cs

示例7: DeepEqualsSimple_ListsOfSameSizeButOneDifferentValue_ReturnsFalse

 public void DeepEqualsSimple_ListsOfSameSizeButOneDifferentValue_ReturnsFalse()
 {
     List<int> listA = new List<int> {1, 2, 3, 4, 5, 6};
     List<int> listB = new List<int> {1, 2, 3, 99, 5, 6};
     Assert.IsFalse(
         listA.DeepEqualsSimple(listB),
         "DeepEqualsSimple should be false for lists of identical length but with different values.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:8,代码来源:MiscellaneousExtensionsTests.cs

示例8: DeepEqualsSimple_ListsIdenticalValuesInDifferentOrder_ReturnsTrue

 public void DeepEqualsSimple_ListsIdenticalValuesInDifferentOrder_ReturnsTrue()
 {
     List<int> listA = new List<int> {1, 2, 3, 4, 5, 6};
     List<int> listB = new List<int> {2, 3, 1, 6, 5, 4};
     Assert.IsTrue(
         listA.DeepEqualsSimple(listB),
         "DeepEqualsSimple should be true for lists of identical content but with different orders.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:8,代码来源:MiscellaneousExtensionsTests.cs

示例9: DeepEqualsSimple_OneNull_ReturnsFalse

 public void DeepEqualsSimple_OneNull_ReturnsFalse()
 {
     List<int> list = new List<int> {1, 2, 3, 4, 5, 6};
     Assert.IsFalse(list.DeepEqualsSimple(null), "DeepEqualsSimple should be false if only one list is null.");
     Assert.IsFalse(
         ((List<int>) null).DeepEqualsSimple(list),
         "DeepEqualsSimple should be false if only one list is null.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:8,代码来源:MiscellaneousExtensionsTests.cs

示例10: DeepEqualsSimple_IdenticalLists_ReturnsTrue

 public void DeepEqualsSimple_IdenticalLists_ReturnsTrue()
 {
     List<int> list = new List<int> {1, 2, 3, 4, 5, 6};
     Assert.IsTrue(list.DeepEqualsSimple(list), "DeepEqualsSimple should be true for identical lists.");
 }
开发者ID:webappsuk,项目名称:CoreLibraries,代码行数:5,代码来源:MiscellaneousExtensionsTests.cs


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