예제 #1
0
        public void HashToString()
        {
            DynamicHash hash = new DynamicHash();

            hash[new Symbol("one")] = 1;
            hash[new Symbol("two")] = 2;

            var result = hash.ToString();

            Assert.IsTrue(result.StartsWith("{"));
            Assert.IsTrue(result.EndsWith("}"));
            Assert.IsTrue(result.Contains(":one=>1"));
            Assert.IsTrue(result.Contains(":two=>2"));
        }
예제 #2
0
        public void EmptyHashToString()
        {
            DynamicHash hash = new DynamicHash();

            Assert.AreEqual("{}", hash.ToString());
        }