Ejemplo n.º 1
0
        public void GenericTools_Collections_FluentDictionary()
        {
            var dict = new FluentDictionary <string, int>()
                       .Add("Key1", 1)
                       .Add("Key2", 2)
                       .Add("Key3", 3)
                       .Remove("Key3");

            MakeSure.That(dict.Count).Is(2);
            MakeSure.That(dict.ContainsKey("Key2")).Is(true);
            MakeSure.That(dict["Key1"]).Is(1);
            MakeSure.That(dict.Keys.Count).Is(2);
            MakeSure.That(dict.Values.Count).Is(2);

            dict.Clear();

            MakeSure.That(dict.Count).Is(0);
        }