public void FormatHashSet_single_item_HashSet_returns_single_item_ToString() { var nodeTypes = new HashSet <NodeType> { NodeType.Publisher }; Assert.AreEqual(NodeType.Publisher.ToString(), FormatHelpers.FormatHashSet(nodeTypes)); }
public void FormatHashSet_two_items_HashSet_contains_both_items_as_ToString() { var nodeTypes = new HashSet <NodeType> { NodeType.Publisher, NodeType.Subscriber }; var formatted = FormatHelpers.FormatHashSet(nodeTypes); Assert.IsTrue(formatted.Contains(NodeType.Publisher.ToString()), formatted); Assert.IsTrue(formatted.Contains(NodeType.Subscriber.ToString()), formatted); }
public void FormatHashSet_empty_HashSet_returns_empty_string() { var nodeTypes = new HashSet <NodeType>(); Assert.AreEqual("", FormatHelpers.FormatHashSet(nodeTypes)); }
public void FormatHashSet_null_returns_empty_string() { Assert.AreEqual("", FormatHelpers.FormatHashSet <int>(null)); }