Package org.internna.iwebmvc.model

Examples of org.internna.iwebmvc.model.Currency


    @Autowired private DomainEntityParser domainEntityParser;

    @Test
    public void testParse() {
        assertNull(domainEntityParser.parse(null));
        Currency c = new Currency();
        assertEquals(c, domainEntityParser.parse(c));
        c.setId(baseDao.first(Currency.class).getId());
        c = (Currency) domainEntityParser.parse(c);
        assertNotNull(c.getCurrency());
    }
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

    private CurrencyParser currencyParser;

    @Test
    public void testParse() {
        assertNull(currencyParser.parse(null));
        Currency currency = new Currency();
        currency.setId(new UUID("000000aa000000aa000000aa000000aa"));
        assertEquals(currencyParser.parse(currency), currency);
        Currency currency2 = new Currency();
        currency2.setCurrency(java.util.Currency.getInstance("EUR"));
        assertNotNull(currencyParser.parse(currency2).getId());
    }
View Full Code Here

            f.setPhotos(new MultiDocument().addDocument(photoMary));
            dao.create(f, false);
            Calendar calendar = Calendar.getInstance();
            int num = 1000;
            boolean emitted = false;
            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());
View Full Code Here

            for (String code : names) {
                if (logger.isDebugEnabled()) logger.debug("Creating currency [" + code + "]");
                try {
                    java.util.Currency currency = java.util.Currency.getInstance(code);
                    if (currency != null) {
                        Currency c = new Currency();
                        c.setCurrency(currency);
                        c.setName(new I18nText());
                        for (int index = 0; index < entries.length; index++)
                            c.getName().add(entries[index].getKey(), entries[index].getValue().getProperty(code));
                        c.setExchangeRate(1.0);
                        c.setDefaultCurrency(code.equals(defaultCurrency));
                        dao.create(c, false);
                        if (count++ % 25 == 0) {
                            dao.flush();
                            dao.clear();
                        }
View Full Code Here

TOP

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

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.