Пример #1
0
        public void ShouldBeAbleToGoIntoEditMode()
        {
            var view = new ProjectView();

            view.Edit();
            Assert.That(view.IsEditing, Is.True);
        }
Пример #2
0
        public void WhenEditingTitleAbbreviationShouldNotShow()
        {
            var view    = new ProjectView(new TitleAbbreviator(10));
            var project = new Project("Fairy Tales", "FT");

            project.AddStory("My title that should be abbreviated");
            view.ActiveProject = project;
            view.Edit();
            Assert.That(view.ActiveProject.Stories[0].Name, Is.EqualTo("My title that should be abbreviated"));
        }
Пример #3
0
        public void IsEditAware()
        {
            var view = new ProjectView();

            Assert.That(view.IsEditing, Is.False);
            view.Edit();
            Assert.That(view.IsEditing, Is.True);
            view.StopEditing();
            Assert.That(view.IsEditing, Is.False);
        }