Exemplo n.º 1
0
 public void ParentCaptionIsUpdated()
 {
     var parent = new EmptyProgressReporter { Caption = "Parent in progress" };
     var child = parent.ChildOperation();
     child.Caption = "Child in progress";
     Assert.AreEqual(child.Caption, parent.Caption);
 }
Exemplo n.º 2
0
        public void ParentProgressIsUpdated()
        {
            var parent = new EmptyProgressReporter { Maximum = 400, Progress = 150 };
            var child = parent.ChildOperation();

            child.Maximum = 700;
            child.Progress = 150;

            Assert.AreEqual(300, parent.Progress, "Parent.Progress == baseProgress + Child.Progress");

            child.Maximum = 50;
            Assert.AreEqual(200, parent.Progress, "Clipping the child's progress through its maximum should update the parent's progress");
        }
Exemplo n.º 3
0
        public void MarqueeIsIgnored()
        {
            var parent = new EmptyProgressReporter { Maximum = 400, Progress = 150 };
            var child = parent.ChildOperation();

            child.Progress = 50;
            child.Progress = null;

            Assert.AreEqual(200, parent.Progress);
        }