Hitta testmetoder via reflexion

This commit is contained in:
2019-11-18 23:58:04 +01:00
parent 094b1dfc34
commit 3c2a38d35f
4 changed files with 37 additions and 4 deletions

View File

@ -7,6 +7,7 @@ namespace TestingLib
{
public class TestThePaymentDate
{
[CheckThisMethod]
public void DateIs30DaysInFuture()
{
var pd = new SUT.PaymentSystem.PaymentDate();
@ -17,6 +18,7 @@ namespace TestingLib
Assert.AreEqual(futureDate, sampleDate.AddDays(30), $"Expected date is not 30 days in the future.");
}
[CheckThisMethod]
public void ReturnsMondayIfProposedIsSunday()
{
@ -26,6 +28,7 @@ namespace TestingLib
var futureDate = pd.CalculateFuturePaymentDate(sampleDate);
Assert.AreEqual(futureDate.DayOfWeek, DayOfWeek.Monday, $"Expected date is not Monday.");
}
[CheckThisMethod]
public void ReturnsMondayIfProposedIsSaturday()
{
var pd = new SUT.PaymentSystem.PaymentDate();