public void TestImportingSampleData_HasChangelogHistory() { IMainWindow mw = new FakeMainWindow(base._handler.Database); ChangelogViewModel cvm = new ChangelogViewModel(mw); DispatcherUtil.DoEvents(); Assert.AreEqual(1, cvm.AllChangesCollection.Groups.Count); }
public void TestChangelog_DeletingMembers_CreatesNewDateGroup() { foreach (var entry in _handler.Database.ChangelogSet.AsEnumerable()) _handler.Database.ChangelogSet.DeleteObject(entry); IMainWindow mw = new FakeMainWindow(base._handler.Database); ChangelogViewModel cvm = new ChangelogViewModel(mw); Assert.AreEqual(0, cvm.AllChangesCollection.Groups.Count); foreach (var member in _handler.Database.MemberSet.Take(6)) { member.MemberDetais.membergroup = DBConstants.ResignedMember; } _handler.Database.SaveChanges(); DispatcherUtil.DoEvents(); Assert.AreEqual(1, cvm.AllChangesCollection.Groups.Count); }