Package org.internna.iwebmvc.model

Examples of org.internna.iwebmvc.model.Amount


    public void testAccept() {
        assertFalse(amountParser.accept(null, null));
        assertFalse(amountParser.accept(Currency.class, null));
        assertFalse(amountParser.accept(null, new Object()));
        assertTrue(amountParser.accept(Amount.class, null));
        assertTrue(amountParser.accept(null, new Amount()));
    }
View Full Code Here


    }

    @Test
    public void testParse() {
        assertNull(amountParser.parse(null));
        Amount amount = new Amount();
        assertEquals(amountParser.parse(amount), amount);
        amount.setCurrency(new Currency());
        amount.getCurrency().setId(new UUID("000000aa000000aa000000aa000000aa"));
        assertEquals(amountParser.parse(amount), amount);
        Amount amount2 = new Amount();
        amount2.setCurrency(new Currency());
        amount2.getCurrency().setCurrency(java.util.Currency.getInstance("USD"));
        assertNotNull(amountParser.parse(amount2).getCurrency().getId());
    }
View Full Code Here

            Currency eur = Currency.obtain("EUR", dao), usd = Currency.obtain("USD", dao);
            int count = 0;
            for (int i = 0; i < (30 + Math.round(Math.random() * 20)); i++) {
              emitted = !emitted;
                Order o = new Order();
                o.setAmount(new Amount());
                double aux = Math.random();
                try {
                    o.setIdentifier(new I18nText());
                    for (Locale l : supportedLocales) o.getIdentifier().add(l, l + ":" + StringUtils.SHA1(String.valueOf(aux)));
              } catch (Exception e) {};
View Full Code Here

TOP

Related Classes of org.internna.iwebmvc.model.Amount

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.