use of eu.ggnet.dwoss.redtape.ee.entity.Dossier in project dwoss by gg-net.
the class DossierTest method testChangesAllowedOpenDossier.
@Test
public void testChangesAllowedOpenDossier() {
Dossier dos1 = sampleOpenDossier();
Dossier dos2 = sampleOpenDossier();
assertTrue(dos1.changesAllowed(dos2));
dos2.setPaymentMethod(PaymentMethod.DIRECT_DEBIT);
dos2.setDispatch(!dos2.isDispatch());
assertTrue(dos1.changesAllowed(dos2));
}
use of eu.ggnet.dwoss.redtape.ee.entity.Dossier in project dwoss by gg-net.
the class DossierTest method sampleOpenDossier.
private Dossier sampleOpenDossier() {
Dossier dos = new Dossier(PaymentMethod.ADVANCE_PAYMENT, true, 1);
Document d1 = new Document(DocumentType.ORDER, Document.Directive.NONE, null);
dos.add(d1);
return dos;
}
use of eu.ggnet.dwoss.redtape.ee.entity.Dossier in project dwoss by gg-net.
the class DossierTest method testChangesAllowedClosedDossierDispatch.
@Test
public void testChangesAllowedClosedDossierDispatch() {
Dossier dos1 = sampleClosedDossier();
Dossier dos2 = sampleClosedDossier();
dos2.setDispatch(!dos1.isDispatch());
assertFalse("Changes should not be allowed", dos1.changesAllowed(dos2));
}
use of eu.ggnet.dwoss.redtape.ee.entity.Dossier in project dwoss by gg-net.
the class DossierTest method testChangesAllowedClosedDossierCustomerId.
@Test
public void testChangesAllowedClosedDossierCustomerId() {
Dossier dos1 = sampleClosedDossier();
Dossier dos2 = sampleClosedDossier();
dos2.setCustomerId(999);
assertFalse(dos1.getCustomerId() == dos2.getCustomerId());
assertFalse("Changes should not be allowed", dos1.changesAllowed(dos2));
}
use of eu.ggnet.dwoss.redtape.ee.entity.Dossier in project dwoss by gg-net.
the class DossierTest method testChangesAllowedOpenDossierWithClosedInvoice.
@Test
public void testChangesAllowedOpenDossierWithClosedInvoice() {
Dossier dos1 = sampleOpenDossierWithClosedInvoice();
Dossier dos2 = sampleOpenDossierWithClosedInvoice();
dos2.setPaymentMethod(PaymentMethod.DIRECT_DEBIT);
assertFalse(dos1.getPaymentMethod() == dos2.getPaymentMethod());
assertFalse(dos1.isClosed());
assertFalse(dos2.isClosed());
assertFalse("Changes should not be allowed", dos1.changesAllowed(dos2));
}
Aggregations