/// <summary> ///SymmetricExceptWith 的测试 ///</summary> public void SymmetricExceptWithTestHelper <KeyT>() { SafeHashSet <KeyT> target = new SafeHashSet <KeyT>(); // TODO: 初始化为适当的值 IEnumerable <KeyT> other = null; // TODO: 初始化为适当的值 target.SymmetricExceptWith(other); Assert.Inconclusive("无法验证不返回值的方法。"); }
public void SafeHashSet依照帶入參數執行邏輯異或_執行成功_應該是SafeHashSet與參數邏輯異或後的結果() { var safeHashSet = new SafeHashSet <int> { 0, 1, 2, 3, 4, 5 }; var param = Enumerable.Range(3, 6); var expectedResult = new List <int> { 0, 1, 2, 6, 8, 7 }; safeHashSet.SymmetricExceptWith(param); safeHashSet.Should().BeEquivalentTo(expectedResult, options => options.WithoutStrictOrderingFor(x => false)); }