Search in sources :

Example 1 with StockUpiImpl

use of eu.ggnet.dwoss.stock.upi.impl.StockUpiImpl in project dwoss by gg-net.

the class ShipmentDialogTryout method testShipment.

@Test
public void testShipment() throws Exception {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    Dl.local().add(Guardian.class, new AbstractGuardian() {

        {
            setRights(new Operator("Testuser", 0, Arrays.asList(AtomicRight.values())));
        }

        @Override
        public void login(String user, char[] pass) throws AuthenticationException {
        }
    });
    StockUpiImpl su = new StockUpiImpl();
    su.setActiveStock(new PicoStock(0, "Demostock"));
    Dl.local().add(StockUpi.class, su);
    Dl.remote().add(StockAgent.class, new StockAgentStub());
    ShipmentController controller = new ShipmentController();
    ShipmentDialog dialog = new ShipmentDialog(new javax.swing.JFrame(), controller);
    dialog.setVisible(true);
}
Also used : Operator(eu.ggnet.dwoss.rights.api.Operator) AuthenticationException(eu.ggnet.saft.core.auth.AuthenticationException) PicoStock(eu.ggnet.dwoss.stock.api.PicoStock) AbstractGuardian(eu.ggnet.dwoss.common.AbstractGuardian) StockUpiImpl(eu.ggnet.dwoss.stock.upi.impl.StockUpiImpl) Test(org.junit.Test)

Aggregations

AbstractGuardian (eu.ggnet.dwoss.common.AbstractGuardian)1 Operator (eu.ggnet.dwoss.rights.api.Operator)1 PicoStock (eu.ggnet.dwoss.stock.api.PicoStock)1 StockUpiImpl (eu.ggnet.dwoss.stock.upi.impl.StockUpiImpl)1 AuthenticationException (eu.ggnet.saft.core.auth.AuthenticationException)1 Test (org.junit.Test)1