public void should_not_charge_given_reading_amount_not_changed()
 {
     var subject = new LifelineSite();
     subject.AddReading(new Reading(10, new DateTime(1997, 1, 1)));
     subject.AddReading(new Reading(10, new DateTime(1997, 2, 1)));
     Assert.Equal(new Dollars(0), subject.Charge());
 }
 public void should_charge_4_91_given_reading_amount_increase_101()
 {
     var subject = new LifelineSite();
     subject.AddReading(new Reading(1000, new DateTime(1997, 1, 1)));
     subject.AddReading(new Reading(1101, new DateTime(1997, 2, 1)));
     Assert.Equal(new Dollars(4.91), subject.Charge());
 }
 public void should_charge_given_reading_amount_max_increaseds()
 {
     var subject = new LifelineSite();
     subject.AddReading(new Reading(0, new DateTime(1997, 1, 1)));
     subject.AddReading(new Reading(int.MaxValue, new DateTime(1997, 2, 1)));
     Assert.Equal(new Dollars(1.9730005337E8), subject.Charge());
 }
 public void should_charge_11_77_given_reading_amount_increase_201()
 {
     var subject = new LifelineSite();
     subject.AddReading(new Reading(50, new DateTime(1997, 1, 1)));
     subject.AddReading(new Reading(251, new DateTime(1997, 2, 1)));
     Assert.Equal(new Dollars(11.77), subject.Charge());
 }
 public void should_throw_exception_given_no_reading()
 {
     var subject = new LifelineSite();
     Assert.Throws<NullReferenceException>(() => subject.Charge());
 }