Exemplo n.º 1
0
        public virtual void CombGuidDictionaryest()
        {
            var dict = new Dictionary <CombGuid, string>();

            dict.Add(CombGuid.NewComb(), "庄生晓梦迷蝴蝶");
            dict.Add(CombGuid.NewComb(), "望帝春心托杜鹃");
            dict.Add(CombGuid.NewComb(), "相见时难别亦难");
            dict.Add(CombGuid.NewComb(), "东风无力百花残");

            var newDict = _formatter.DeepCopy(dict);

            Assert.Equal(dict.Count, newDict.Count);
            Assert.Equal(dict.Keys.ToArray(), newDict.Keys.ToArray());

            newDict = (Dictionary <CombGuid, string>)_formatter.DeepCopyObject(dict);
            Assert.Equal(dict.Count, newDict.Count);
            Assert.Equal(dict.Keys.ToArray(), newDict.Keys.ToArray());
        }