Search in sources :

Example 21 with Dossier

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));
}
Also used : Dossier(eu.ggnet.dwoss.redtape.ee.entity.Dossier) Test(org.junit.Test)

Example 22 with Dossier

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;
}
Also used : Dossier(eu.ggnet.dwoss.redtape.ee.entity.Dossier) Document(eu.ggnet.dwoss.redtape.ee.entity.Document)

Example 23 with Dossier

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));
}
Also used : Dossier(eu.ggnet.dwoss.redtape.ee.entity.Dossier) Test(org.junit.Test)

Example 24 with Dossier

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));
}
Also used : Dossier(eu.ggnet.dwoss.redtape.ee.entity.Dossier) Test(org.junit.Test)

Example 25 with Dossier

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));
}
Also used : Dossier(eu.ggnet.dwoss.redtape.ee.entity.Dossier) Test(org.junit.Test)

Aggregations

Dossier (eu.ggnet.dwoss.redtape.ee.entity.Dossier)47 Document (eu.ggnet.dwoss.redtape.ee.entity.Document)30 Test (org.junit.Test)17 Position (eu.ggnet.dwoss.redtape.ee.entity.Position)11 DossierEao (eu.ggnet.dwoss.redtape.ee.eao.DossierEao)8 DocumentHistory (eu.ggnet.dwoss.redtape.ee.entity.DocumentHistory)6 LogicTransaction (eu.ggnet.dwoss.stock.ee.entity.LogicTransaction)6 UniqueUnit (eu.ggnet.dwoss.uniqueunit.ee.entity.UniqueUnit)6 Address (eu.ggnet.dwoss.redtape.ee.entity.Address)5 StockUnit (eu.ggnet.dwoss.stock.ee.entity.StockUnit)4 SubMonitor (eu.ggnet.dwoss.progress.SubMonitor)3 AddressEmo (eu.ggnet.dwoss.redtape.ee.emo.AddressEmo)3 StockUnitEao (eu.ggnet.dwoss.stock.ee.eao.StockUnitEao)3 RepaymentCustomers (eu.ggnet.dwoss.mandator.api.value.RepaymentCustomers)2 PositionBuilder (eu.ggnet.dwoss.redtape.ee.entity.PositionBuilder)2 Reminder (eu.ggnet.dwoss.redtape.ee.entity.Reminder)2 RedTapeWorker (eu.ggnet.dwoss.redtapext.ee.RedTapeWorker)2 ReportLineEao (eu.ggnet.dwoss.report.ee.eao.ReportLineEao)2 Report (eu.ggnet.dwoss.report.ee.entity.Report)2 eu.ggnet.dwoss.rules (eu.ggnet.dwoss.rules)2