public void Promote() { var calculate = new RateCalculator(); var rating = calculate.Calculate(this); if (rating == 0) { System.Console.WriteLine("Promote logic Change!!!!!!"); } else { System.Console.WriteLine("Game Over"); } }
public void TestCalculateRateForNoAlbums() { // ARRANGE var rates = new List <byte?>(); // ACT var rate = _rateCalculator.Calculate(rates); // ASSERT Assert.That(rate, Is.Null); }
public ActionResult <RateResult> Get(DateTime entry, DateTime exit) { if (exit < entry) { return(BadRequest()); } var rate = RateCalculator.Calculate(entry, exit); if (rate == null) { return(BadRequest()); } return(Ok(rate)); }
public void Promote() { var calculator = new RateCalculator(); var rating = calculator.Calculate(this); }
public void Promote() { var rateCalculator = new RateCalculator(); //Caveat: Its not good to instantiate a new object inside a method here as this creates coupling/dependency to this object. We'll see proper way in Interfaces afterwards var rating = rateCalculator.Calculate(this); }