public void OnShowDetailTest()
        {
            IProjectNotesService             projectNotesService = new ProjectNotesServiceMock(2);
            OverviewWindowViewModel_Accessor target = new OverviewWindowViewModel_Accessor(projectNotesService);

            Assert.IsFalse(target.IsDetailViewVisible);
            Assert.AreEqual(projectNotesService.ProjectNotes.ElementAt(0), target.CurrentProjectNote);
            target.OnShowDetail(projectNotesService.ProjectNotes.ElementAt(1));
            Assert.AreEqual(projectNotesService.ProjectNotes.ElementAt(1), target.CurrentProjectNote);
            Assert.IsTrue(target.IsDetailViewVisible);
        }
Example #2
0
        public void OnShowDetailTest()
        {
            IProjectNotesService projectNotesService = new ProjectNotesServiceMock(2);
            var target = new OverviewWindowViewModel_Accessor(projectNotesService, null);

            Assert.IsFalse(target.IsDetailViewVisible);
            target.ProjectNotes.MoveCurrentToFirst();
            Assert.AreEqual(projectNotesService.ProjectNotes.ElementAt(0), target.CurrentProjectNote);
            var pn = projectNotesService.ProjectNotes[1];

            Assert.AreSame(pn, projectNotesService.ProjectNotes.ElementAt(1));
            target.OnShowDetail(pn);
            Assert.AreSame(pn, target.CurrentProjectNote);
            Assert.IsTrue(target.IsDetailViewVisible);
        }