public void LojalnyKontrahent_4DokumentyZOstatniegoPolrocza_False() { var result = KalkulatorRabatu.LojalnyKontrahent(() => new[] { Date.Today, Date.Today.AddMonths(-1), Date.Today.AddMonths(-3), Date.Today.AddMonths(-4) }); Assert.IsFalse(result); }
public void LojalnyKontrahent_5DokumentowZOstatniegoPolrocza_True() { var result = KalkulatorRabatu.LojalnyKontrahent(() => new[] { Date.Today, Date.Today.AddMonths(-1), Date.Today.AddMonths(-2), Date.Today.AddMonths(-3), Date.Today.AddMonths(-4), }); Assert.IsTrue(result); }
public void LojalnyKontrahent_Powyzej4DokumentowAleTylkoTrzyZOstatniegoPolrocza_False() { var result = KalkulatorRabatu.LojalnyKontrahent(() => new[] { Date.Today, Date.Today.AddMonths(-4), Date.Today.AddMonths(-5), Date.Today.AddMonths(-6), Date.Today.AddMonths(-7), Date.Today.AddMonths(-8), Date.Today.AddMonths(-9), }); Assert.IsFalse(result); }
public decimal Policz_KontrahentLojalny(decimal wartosc) => KalkulatorRabatu.PoliczRabat(() => wartosc, () => true);
public decimal Policz_KontrahentNielojalny(decimal wartosc) => KalkulatorRabatu.PoliczRabat(() => wartosc, () => false);
public void SetUp() { _ = new KalkulatorRabatu(); }