public void DoProgress_Should_Increase_Current() { Progress p = new Progress(4); p.DoProgress(); Assert.AreEqual(1, p.Current); Assert.IsFalse(p.Done); }
public void DoProgress_Should_Set_Done_If_Current_Equals_Max() { Progress p = new Progress(1); p.DoProgress(); Assert.AreEqual(1, p.Current); Assert.IsTrue(p.Done); }
public void DoProgress_full_Progress() { Progress p = new Progress(3); p.DoProgress(); Assert.AreEqual(1, p.Current); Assert.IsFalse(p.Done); p.DoProgress(); Assert.AreEqual(2, p.Current); Assert.IsFalse(p.Done); p.DoProgress(); Assert.AreEqual(3, p.Current); Assert.IsTrue(p.Done); }
public void Percent_Should_Calculate_Percent() { Progress p = new Progress(2); p.DoProgress(); Assert.AreEqual(0.5f, p.Percent); }