Esempio n. 1
0
        public void ContainsKey()
        {
            var props = new GraphLogPropertyCollection();

            props.AddProperty("key1", "value1");
            Assert.IsTrue(props.ContainsKey("key1"));
            Assert.IsFalse(props.ContainsKey("key2"));
        }
Esempio n. 2
0
        public void AddNewProperty_WhenKeyExists_KeysDoNotClash()
        {
            var props         = new GraphLogPropertyCollection();
            var beforeNewProp = props.Count();

            props.AddProperty("key1", "value1");
            props.AddProperty("key1", "value2");

            Assert.AreEqual(beforeNewProp + 2, props.Count());
            Assert.AreEqual(2, props.Count(x => x.Key.StartsWith("key1")));
            Assert.IsTrue(props.ContainsKey("key1"));
            Assert.IsTrue(props.ContainsKey("key1_1"));
        }