Example #1
0
        public void TestRemoveChild()
        {
            var model = new DummyTeam {
                Name = "dash",
            };

            model.List.Add(new Utils.PlayerDummy());
            model.List.Add(new Utils.PlayerDummy());
            var viewModel = new DummyTeamVM {
                Model = model
            };

            model.List.Remove(model.List [0]);

            Assert.AreEqual(1, viewModel.Count());
        }
Example #2
0
        public void TestModelSync()
        {
            var model = new DummyTeam {
                Name = "dash",
            };

            model.List.Add(new Utils.PlayerDummy());
            model.List.Add(new Utils.PlayerDummy());
            model.List.Add(new Utils.PlayerDummy());

            var viewModel = new DummyTeamVM {
                Model = model
            };

            Assert.AreEqual(3, viewModel.Count());
            Assert.IsInstanceOf(typeof(PlayerVM), viewModel.First());
        }