Package whitewerx.com.trapos.model.event

Examples of whitewerx.com.trapos.model.event.PositionChangeEvent


        notifyChange();
    }

    private void notifyChange() {
        DomainEvents.raise(new PositionChangeEvent(this));
    }
View Full Code Here


    @Test
    public void shouldAddATradeToAFlatPositionAndSendPositionChangeEvent() {
        Position positionEURUSD = new PositionFactory().createFlatPositionFor(EURUSD);

        Position expectedPosition = create5point1MillionEURUSDPosition();
        final PositionChangeEvent positionChangeEvent = new PositionChangeEvent(expectedPosition);

        @SuppressWarnings("unchecked")
        final EventHandler<PositionChangeEvent> positionChangeHandler = (EventHandler<PositionChangeEvent>) context
                .mock(EventHandler.class);
View Full Code Here

    @Test
    public void shouldHaveATwoMillionPositionAverageRate() {
        Position positionEURUSD = new PositionFactory().createFlatPositionFor(EURUSD);

        Position expectedPosition = create2MillionEURUSDPosition();
        final PositionChangeEvent positionChangeEvent = new PositionChangeEvent(expectedPosition);

        @SuppressWarnings("unchecked")
        final EventHandler<PositionChangeEvent> positionChangeHandler = (EventHandler<PositionChangeEvent>) context
                .mock(EventHandler.class);
View Full Code Here

TOP

Related Classes of whitewerx.com.trapos.model.event.PositionChangeEvent

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.