public void UnionShouldWorkProperly() { var firstSet = new CustomHashSet <string> { "Perl", "Java", "C#", "SQL", "PHP" }; var secondSet = new CustomHashSet <string> { "Oracle", "SQL", "MySQL" }; var union = firstSet.UnionWith(secondSet); Assert.AreEqual(7, union.Count); }
private static void DisplayUnionIntersect(CustomHashSet <string> firstSet, CustomHashSet <string> secondSet) { Console.Write("First set: "); PrintSet(firstSet); Console.Write("Second set: "); PrintSet(secondSet); var union = firstSet.UnionWith(secondSet); Console.Write("Union: "); PrintSet(union); var intersect = firstSet.IntersectWith(secondSet); Console.Write("Intersect: "); PrintSet(intersect); }
public void UnionShouldWorkProperly() { var firstSet = new CustomHashSet<string> { "Perl", "Java", "C#", "SQL", "PHP" }; var secondSet = new CustomHashSet<string> { "Oracle", "SQL", "MySQL" }; var union = firstSet.UnionWith(secondSet); Assert.AreEqual(7, union.Count); }