use of org.apache.isis.applib.services.clock.ClockService in project estatio by estatio.
the class DocFragments_for_Invoicing_Test method setUp.
@Before
public void setUp() throws Exception {
clockService = new ClockService();
fake = new FakeDataService();
ReflectUtils.inject(fake, clockService);
fake.init();
freeMarkerService = new FreeMarkerService();
ReflectUtils.inject(freeMarkerService, "configurationService", mockConfigurationService);
final ImmutableMap<String, String> props = ImmutableMap.of();
freeMarkerService.init(props);
templateName = "Template name";
}
use of org.apache.isis.applib.services.clock.ClockService in project estatio by estatio.
the class LeaseStatusService_Test method setUp.
@Before
public void setUp() throws Exception {
lease = new Lease();
service = new LeaseStatusService();
service.clockService = new ClockService() {
@Override
public LocalDate now() {
// TODO Auto-generated method stub
return new LocalDate(2014, 4, 1);
}
};
}
use of org.apache.isis.applib.services.clock.ClockService in project estatio by estatio.
the class LeaseRepository_Test method setup.
@Before
public void setup() {
asset = new FixedAssetForTesting();
property = new Property();
leaseRepository = new LeaseRepository() {
@Override
protected <T> T uniqueMatch(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderMethod.UNIQUE_MATCH);
return (T) new Lease();
}
@Override
protected List<Lease> allInstances() {
finderInteraction = new FinderInteraction(null, FinderMethod.ALL_INSTANCES);
return null;
}
@Override
protected <T> List<T> allMatches(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderMethod.ALL_MATCHES);
return null;
}
};
leaseRepository.clockService = new ClockService();
}
Aggregations