Пример #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);
 }
Пример #2
0
        public void MarqueeIsIgnored()
        {
            var parent = new EmptyProgressReporter { Maximum = 400, Progress = 150 };
            var child = parent.ScaledChildOperation(200);

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

            Assert.AreEqual(250, parent.Progress);
        }
Пример #3
0
        public void ParentProgressIsUpdated()
        {
            var parent = new EmptyProgressReporter { Maximum = 400, Progress = 150 };
            var child = parent.ScaledChildOperation(200);

            child.Maximum = 300;
            child.Progress = 150;

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

            child.Maximum = 50;
            Assert.AreEqual(350, parent.Progress, "Clipping the child's progress through its maximum should fill the progress range");
        }