use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.
the class DocumentAdressUpdateView method main.
// End of variables declaration//GEN-END:variables
public static void main(String[] args) {
Address invoice = new Address("Blubba, invoice");
// TODO : fill Dl.remote().add(AddressService.class) // With a sample
DocumentAdressUpdateView view = new DocumentAdressUpdateView(1, invoice.getDescription(), true);
OkCancelDialog<DocumentAdressUpdateView> dialog = new OkCancelDialog<>("TOLLER TITEL", view);
dialog.setVisible(true);
System.exit(0);
}
use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.
the class DocumentExactlyBriefedTest method testInvoiceAddressChange.
@Test
public void testInvoiceAddressChange() {
assertTrue("Documents difference must not invalidate exactly briefed:\n" + doc1 + "\n" + doc2, doc1.isStillExactlyBriefed(doc2));
doc1.setInvoiceAddress(new Address("MuhBlub"));
assertFalse("Invoice Address change must invalidate exactly briefed:\n" + doc1 + "\n" + doc2, doc1.isStillExactlyBriefed(doc2));
}
use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.
the class DocumentExactlyBriefedTest method testShippingAddressChange.
@Test
public void testShippingAddressChange() {
assertTrue("Documents difference must not invalidate exactly briefed:\n" + doc1 + "\n" + doc2, doc1.isStillExactlyBriefed(doc2));
doc1.setShippingAddress(new Address("MuhBlub"));
assertFalse("Shipping Address change must invalidate exactly briefed:\n" + doc1 + "\n" + doc2, doc1.isStillExactlyBriefed(doc2));
}
use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.
the class AddressEmo method request.
/**
* Get a Address by description search.
*
* @param searchAddress the address description to search for.
* @return a Address by description search or a new persisted Address.
*/
public Address request(String searchAddress) {
AddressEao addressEao = new AddressEao(em);
Address address = addressEao.findByDescription(searchAddress);
// persist address if nothing is found
if (address == null) {
address = new Address(searchAddress);
em.persist(address);
return address;
}
return address;
}
use of eu.ggnet.dwoss.redtape.ee.entity.Address in project dwoss by gg-net.
the class DocumentSupporterIT method testCreate.
/**
* Test of create method, of class RedTapeOperation.
*/
@Test
public void testCreate() {
Dossier dos = new Dossier();
dos.setPaymentMethod(PaymentMethod.ADVANCE_PAYMENT);
dos.setDispatch(true);
dos.setCustomerId(1);
Document doc = new Document();
doc.setType(DocumentType.ORDER);
doc.setActive(true);
doc.setDirective(Document.Directive.WAIT_FOR_MONEY);
doc.setHistory(new DocumentHistory("JUnit", "Automatische Erstellung eines leeren Dokuments"));
Address a = new Address("Herr Muh\nMuhstrasse 7\n12345 Muhstadt");
doc.setInvoiceAddress(a);
doc.setShippingAddress(a);
dos.add(doc);
doc.append(NaivBuilderUtil.comment());
doc.append(NaivBuilderUtil.service());
doc.append(NaivBuilderUtil.shippingcost());
JasperPrint print = documentSupporter.render(doc, DocumentViewType.DEFAULT);
assertNotNull("A JasperPrint should not be null", print);
}
Aggregations