use of org.incode.module.unittestsupport.dom.repo.FinderInteraction in project estatio by estatio.
the class NumeratorCollectionRepository_Test method setup.
@Before
public void setup() {
seller = new PartyForTesting();
buyer = new PartyForTesting();
paymentMethod = PaymentMethod.BANK_TRANSFER;
lease = new Lease() {
@Override
public Property getProperty() {
return null;
}
};
invoiceStatus = InvoiceStatus.APPROVED;
dueDate = new LocalDate(2013, 4, 1);
invoiceRepository = new InvoiceRepository() {
@Override
protected <T> T firstMatch(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderInteraction.FinderMethod.FIRST_MATCH);
return null;
}
@Override
protected List<Invoice> allInstances() {
finderInteraction = new FinderInteraction(null, FinderInteraction.FinderMethod.ALL_INSTANCES);
return null;
}
@Override
protected <T> List<T> allMatches(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderInteraction.FinderMethod.ALL_MATCHES);
return null;
}
};
invoiceForLeaseRepository = new InvoiceForLeaseRepository() {
};
estatioNumeratorRepository = new NumeratorForCollectionRepository();
}
use of org.incode.module.unittestsupport.dom.repo.FinderInteraction in project estatio by estatio.
the class OccupancyRepository_Test method setup.
@Before
public void setup() {
lease = new Lease();
unit = new Unit();
startDate = new LocalDate(2013, 4, 1);
occupancyRepository = new OccupancyRepository() {
@Override
protected <T> T firstMatch(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderMethod.FIRST_MATCH);
return null;
}
@Override
protected List<Occupancy> 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;
}
};
}
use of org.incode.module.unittestsupport.dom.repo.FinderInteraction 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();
}
use of org.incode.module.unittestsupport.dom.repo.FinderInteraction in project estatio by estatio.
the class PropertyMenu2_Test method setup.
@Before
public void setup() {
propertyRepository = new PropertyRepository() {
@Override
protected <T> T uniqueMatch(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderMethod.UNIQUE_MATCH);
return (T) new Property();
}
@Override
protected List<Property> 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;
}
};
propertyMenu = new PropertyMenu();
propertyMenu.propertyRepository = propertyRepository;
}
use of org.incode.module.unittestsupport.dom.repo.FinderInteraction in project estatio by estatio.
the class AgreementRepository_Test method setup.
@Before
public void setup() {
agreementType = new AgreementType();
agreementRoleType = new AgreementRoleType();
party = new PartyForTesting();
agreementRepository = new AgreementRepository() {
@Override
protected <T> T firstMatch(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderMethod.FIRST_MATCH);
return null;
}
@Override
protected List<Agreement> 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;
}
};
}
Aggregations