Skip to content
Snippets Groups Projects
Commit 4b1b7788 authored by Sara Prifti's avatar Sara Prifti
Browse files

different cases for buyTickets Tests Work!

parent 5142d563
Branches Ying
No related tags found
No related merge requests found
......@@ -74,6 +74,16 @@ public class DataService {
return isValid;
}
public static boolean discountCanBeAppliedOnTheTicket(Ticket ticket){
boolean applyDiscount=false;
if(ticket.getValidFor().getValue().equals("30d") || ticket.getValidFor().getValue().equals("1y")){
if(ticket.getDiscountCard()==true){
applyDiscount=true;
}
}
return applyDiscount;
}
//check if the discountCard can be applied for the requested ticket
public static boolean discountCanBeApplied(DiscountCard discountCard, TicketValidationRequest ticketValidationRequest){
boolean applyDiscount=false;
......
......@@ -50,7 +50,7 @@ public class TicketTest {
parms1.put("validFor", "1d");
parms1.put("zone", "A");
parms1.put("student", false);
parms1.put("discountCard", true);
parms1.put("discountCard", false);
parms1.put("disabled", true);
parms1.put("validFrom", "2022-05-20 10:00:00");
RestAssured.given().header("content-Type", "application/json").and()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment