public void TestAdd() { string name = "soime"; Maker maker = new Maker(name); FieldManagerViewModel vm = new FieldManagerViewModel(); vm.AddField(maker); Assert.IsTrue(vm.MakerList.Any(x => x.Name == maker.Name)); Assert.IsTrue(vm.MakerList.Any(x => x.ID == maker.ID)); }
public void TestRemove() { FieldManagerViewModel vm = new FieldManagerViewModel(); var maker = vm.MakerList.Random(); vm.RemoveField(maker); vm.MakerList.Any(x => x.Name == maker.Name); vm.MakerList.Any(x => x.ID == maker.ID); Assert.IsFalse(vm.MakerList.Any(x => x.Name == maker.Name)); Assert.IsFalse(vm.MakerList.Any(x => x.ID == maker.ID)); }