public void AddAndRemoveAndCallbackFilterTest() { var projectNotesService = new ProjectNotesServiceMock(5); var target = new OverviewWindowViewModel_Accessor(projectNotesService); var filter = new MetadataMock(new MetadataTypeMock { Name = "Sector" }, "Oberkriterium"); target.AddFilter(filter); Assert.IsFalse(target.IsFilterViewVisible); Assert.IsFalse(target.IsDetailViewVisible); Assert.AreEqual(0, target.ProjectNotes.Count); target.RemoveFilter(filter); Assert.AreEqual(5, target.ProjectNotes.Count); }
public void AddAndRemoveAndCallbackFilterTest() { var projectNotesService = new ProjectNotesServiceMock(5, "Sector"); var n = projectNotesService.Metadata.Keys.ElementAt(0).Name; var target = new OverviewWindowViewModel_Accessor(projectNotesService); target.IsDetailViewVisible = true; var filter = new MetadataMock(new MetadataTypeMock() { Name = "Sector" }, "Oberkriterium"); target.AddFilter(filter); Assert.IsFalse(target.IsFilterViewVisible); Assert.IsFalse(target.IsDetailViewVisible); Assert.AreEqual(0, target.ProjectNotes.Cast <IProjectNote>().Count()); target.RemoveFilter(filter); Assert.AreEqual(5, target.ProjectNotes.Cast <IProjectNote>().Count()); }