com.version1.testdata.BankHoliday Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenium-java-test-automation Show documentation
Show all versions of selenium-java-test-automation Show documentation
A simple Selenium framework offering externalised configuration, a good selection of libraries for supporting
test data, simple WebDriver browser binary resolution and an opinionated approach for WebDriver test design.
The newest version!
package com.version1.testdata;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.joda.time.LocalDate;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
/**
* A simple representation class to calculate the bank holiday
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class BankHoliday {
private String title;
private LocalDate localDate;
/**
*
* @return title from the Json property
*/
public String getTitle() {
return title;
}
/**
*
* @param title for the bank holiday
*/
@JsonProperty("title")
public void setTitle(String title) {
this.title = title;
}
/**
*
* @param dateFormat for the bank holiday
* @return localDate from the bank holiday
*/
public String getLocalDate(String dateFormat) {
DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern(dateFormat);
return this.localDate.toString(dateTimeFormatter);
}
/**
*
* @return localDate from the bank holiday
*/
public LocalDate getLocalDate() {
return this.localDate;
}
/**
*
* @param "date" for the bank holiday
*/
@JsonProperty("date")
public void setLocalDate(String localDate) {
this.localDate = LocalDate.parse(localDate);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy