private void CheckPurchaseBtn_Click(object sender, EventArgs e)
        {
            Notification status;
            string       userPlate   = this.userPlateTxtBox.Text;
            string       hourToCheck = this.dateTimePicker.Value.ToString();

            status = systemParking.AnyPurchaseMatchesPlateAndHour(userPlate, hourToCheck);
            this.outputErrorLbl.Text      = status.HasErrors() ? $"Error: {status.Message()}" : status.Message();
            this.outputErrorLbl.ForeColor = status.HasErrors() ? Color.Red : Color.Green;
        }
Beispiel #2
0
 public void AnyPurchaseMatchesPlatesAndHourTrueTest()
 {
     system.AddPurchase(purchase);
     Assert.IsTrue(system.AnyPurchaseMatchesPlateAndHour("ABC1234", DateTime.Now.AddMinutes(10).ToString("HH:mm")).HasSuccess());
 }