Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        public void FormatHashSet_empty_HashSet_returns_empty_string()
        {
            var nodeTypes = new HashSet <NodeType>();

            Assert.AreEqual("", FormatHelpers.FormatHashSet(nodeTypes));
        }
Esempio n. 4
0
 public void FormatHashSet_null_returns_empty_string()
 {
     Assert.AreEqual("", FormatHelpers.FormatHashSet <int>(null));
 }