Esempio n. 1
0
        public void TestApplyDiff(ModuleSet starting, Diff diff, ModuleSet expected)
        {
            ModuleSet updated = starting.ApplyDiff(diff);

            Assert.Equal(expected.Modules.Count, updated.Modules.Count);

            foreach (KeyValuePair <string, IModule> module in expected.Modules)
            {
                Assert.True(updated.TryGetModule(module.Key, out IModule updatedMod));
                Assert.Equal(module.Value, updatedMod);
            }
        }