Package org.archfirst.bfoms.domain.account.brokerage

Examples of org.archfirst.bfoms.domain.account.brokerage.BrokerageAccountSummary


       
        List<Position> positions = new ArrayList<Position>();
        positions.add(instrumentPosition);
        positions.add(cashPosition);
       
        BrokerageAccountSummary summary1 = new BrokerageAccountSummary(
                ACCOUNT_ID,
                ACCOUNT_NAME,
                CASH_IN_ACCOUNT,
                CASH_IN_ACCOUNT.plus(instrumentPosition.getMarketValue()),
                true,
                true,
                true,
                positions);
       
        ObjectMapper mapper =
            new ObjectMapperProvider().getContext(ObjectMapper.class);
        String json1 = mapper.writeValueAsString(summary1);
        // System.out.println(json1);
       
        BrokerageAccountSummary summary2 =
            mapper.readValue(json1, BrokerageAccountSummary.class);
       
        Assert.assertEquals(summary2, summary1);
    }
View Full Code Here

TOP

Related Classes of org.archfirst.bfoms.domain.account.brokerage.BrokerageAccountSummary

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.