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()); }
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()); }