public void ProductionCalculator_GetBonusPPD_ReturnsZeroWhenFrameTimeIsZero_Test()
        {
            var frameTime = TimeSpan.Zero;
            var unitTime  = TimeSpan.Zero;

            Assert.AreEqual(0.0, ProductionCalculator.GetBonusPPD(frameTime, 0, 0.0, 0.0, 0.0, 0.0, unitTime));
        }
        public void ProductionCalculator_GetBonusPPD_ReturnsPPDWithNoBonusWhenUnitTimeIsZero_Test()
        {
            var frameTime = TimeSpan.FromMinutes(5);
            var unitTime  = TimeSpan.Zero;

            Assert.AreEqual(1440.0, ProductionCalculator.GetBonusPPD(frameTime, 100, 500.0, 0.0, 0.0, 0.0, unitTime));
        }
        public void ProductionCalculator_GetBonusPPD_ReturnsPPDWithBonus_Test()
        {
            var frameTime = TimeSpan.FromMinutes(5);
            var unitTime  = TimeSpan.FromMinutes(5 * 100);

            Assert.AreEqual(39307.35, ProductionCalculator.GetBonusPPD(frameTime, 100, 700.0, 26.4, 3.0, 5.0, unitTime), 0.01);
        }
 /// <summary>
 /// Gets the points per day measurement based the given frame time, work unit information, and the unit completion time.
 /// </summary>
 /// <param name="protein"></param>
 /// <param name="frameTime">The work unit frame time.</param>
 /// <param name="unitTime">The overall unit completion time.</param>
 /// <returns>The points per day for the work unit.</returns>
 public static double GetBonusPPD(this Protein protein, TimeSpan frameTime, TimeSpan unitTime)
 {
     return(ProductionCalculator.GetBonusPPD(frameTime, protein.Frames, protein.Credit, protein.KFactor, protein.PreferredDays, protein.MaximumDays, unitTime));
 }