Ejemplo n.º 1
0
        public void provides_has_empty_sets_for_empty_input_dictionaries()
        {
            var calc = new ChangesCalc(new Dictionary <string, int>(), new Dictionary <string, int>());

            calc.CalculateChanges();
            Assert.That(calc.InsertedKeys, Is.Empty);
            Assert.That(calc.DeletedKeys, Is.Empty);
        }
Ejemplo n.º 2
0
        public void new_keys_returned_in_inserted_keys()
        {
            var newValues = new Dictionary <string, int>();

            newValues.Add("key1", 1);
            newValues.Add("key2", 2);

            var calc = new ChangesCalc(new Dictionary <string, int>(), newValues);

            calc.CalculateChanges();

            Assert.That(calc.InsertedKeys, Is.EqualTo(newValues.Keys));
            Assert.That(calc.DeletedKeys, Is.Empty);
        }