public void Should_Calculate_Next_Resistance_Amount_When_Scenario_Is_Complex2() { //TODO: Refine/base expectations dynamically not statically //ARRANGE var sut = new ResistanceBandService(_repo.Object); //ACT var result = sut.CalculateNextAvailableResistanceAmount(40, 20, 25, false); //ASSERT Assert.AreEqual(2, result.Count); Assert.AreEqual(63, result.Sum(band => band.MaxResistanceAmount)); Assert.IsTrue( result.Count(band => band.Color == "Onyx") == 1 && result.Count(band => band.Color == "Purple") == 1); }
public void Should_Calculate_Next_Resistance_Amount_When_Band_Resistances_Are_Doubled() { //TODO: Refine/base expectations dynamically not statically //ARRANGE var sut = new ResistanceBandService(_repo.Object); //ACT var result = sut.CalculateNextAvailableResistanceAmount(120, 10, 15, true); //ASSERT Assert.AreEqual(3, result.Count); Assert.AreEqual(132, result.Sum(band => band.MaxResistanceAmount) * 2); Assert.IsTrue( result.Count(band => band.Color == "Onyx") == 1 && result.Count(band => band.Color == "Purple") == 1 && result.Count(band => band.Color == "Yellow") == 1); }