예제 #1
0
 public void Add_Cancelled()
 {
     testViewModel = new BatchEditWindowTestViewModel(mgr, new TestMessageBox(), new AddWindowWithFalse());
     testViewModel.Refresh();
     Assert.AreEqual(3, testViewModel.Collection.Count);
     testViewModel.Add();
     Assert.AreEqual(3, testViewModel.Collection.Count);
 }
예제 #2
0
        public void Add()
        {
            testViewModel = new BatchEditWindowTestViewModel(mgr, new TestMessageBox(), new AddWindowWithTrue());
            testViewModel.Refresh();
            Assert.AreEqual(3, testViewModel.Collection.Count);
            testViewModel.Add();
            testViewModel.Save();
            Assert.AreEqual(4, testViewModel.Collection.Count);
            var data = new EditableData();

            Assert.AreEqual(data.CreateNewData().Name, testViewModel.Collection[3].Name);
        }