public void ReduceHoursbyPctTest() { var node = new ProcessNode(); Assert.IsTrue(node.ReduceHoursbyPct(-2).PlannedBeginTime == node.PlannedCompletionTime); node.PlannedBeginTime = DateTime.Now; Assert.IsTrue(node.ReduceHoursbyPct(0).PlannedCompletionTime == node.PlannedCompletionTime); Assert.IsTrue(node.ReduceHoursbyPct(1).PlannedCompletionTime == node.PlannedCompletionTime.Value.AddHours(1)); node.PlannedBeginTime = null; Assert.IsTrue(node.ReduceHoursbyPct(1).PlannedBeginTime == node.PlannedBeginTime); Assert.Fail(); }