Exemplo n.º 1
0
        public void ShouldBeAbleToGoIntoEditMode()
        {
            var view = new ProjectView();

            view.Edit();
            Assert.That(view.IsEditing, Is.True);
        }
Exemplo n.º 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"));
        }
Exemplo n.º 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);
        }