use of org.estatio.module.invoice.dom.InvoiceRepository in project estatio by estatio.
the class InvoiceRepository_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, FinderMethod.FIRST_MATCH);
return null;
}
@Override
protected List<Invoice> 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;
}
};
invoiceForLeaseRepository = new InvoiceForLeaseRepository() {
@Override
protected <T> T firstMatch(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderMethod.FIRST_MATCH);
return null;
}
@Override
protected List<InvoiceForLease> 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;
}
};
estatioNumeratorRepository = new NumeratorForCollectionRepository();
}
use of org.estatio.module.invoice.dom.InvoiceRepository 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();
}
Aggregations