Пример #1
0
        public void MarkerChangeSavedOnPriorityChanged()
        {
            var markers = GetTestMarkers();

            var view = new TodoListSettingsUserControl(markers, new Mock <GridViewSort <ToDoMarker> >("", false).Object);

            view.ActiveMarkerPriority = TodoPriority.High;

            Assert.AreEqual(view.ActiveMarkerPriority, view.TodoMarkers[0].Priority);
        }
Пример #2
0
        public void SetActiveItemChangesViewSelectedIndex()
        {
            //arrange
            var markers = GetTestMarkers();

            var view = new TodoListSettingsUserControl(markers, new Mock <GridViewSort <ToDoMarker> >("", false).Object);

            //act
            view.SelectedIndex = 1;

            Assert.AreEqual(1, view.SelectedIndex);
        }
Пример #3
0
        public void ViewTextIsNotNullOrEmptyAfterControllerConstruction()
        {
            //arrange
            var markers = new List <ToDoMarker> {
                new ToDoMarker("Todo:", TodoPriority.Medium)
            };

            var view = new TodoListSettingsUserControl(markers, new Mock <GridViewSort <ToDoMarker> >("", false).Object);

            //assert
            Assert.AreEqual("Todo:", view.ActiveMarkerText);
        }
Пример #4
0
        public void ViewTextMatchesAfterSelectionChange()
        {
            var markers = new List <ToDoMarker>
            {
                new ToDoMarker("Todo:", TodoPriority.Medium),
                new ToDoMarker("Note:", TodoPriority.Low)
            };

            var view = new TodoListSettingsUserControl(markers, new Mock <GridViewSort <ToDoMarker> >("", false).Object);

            //act
            view.SelectedIndex = 1;

            Assert.AreEqual("Note:", view.ActiveMarkerText);
        }