com.flextrade.jfixture.jodatime.customisation.ChronologyBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jfixture-jodatime Show documentation
Show all versions of jfixture-jodatime Show documentation
A joda time customisation for handling Joda Time classes in JFixture.
package com.flextrade.jfixture.jodatime.customisation;
import com.flextrade.jfixture.NoSpecimen;
import com.flextrade.jfixture.SpecimenBuilder;
import com.flextrade.jfixture.SpecimenContext;
import org.joda.time.Chronology;
import org.joda.time.chrono.ISOChronology;
public class ChronologyBuilder implements SpecimenBuilder {
@Override
public Object create(Object request, SpecimenContext context) {
if (!request.equals(Chronology.class))
return new NoSpecimen();
return ISOChronology.getInstance();
}
}