Package match.handler

Examples of match.handler.MatchHandler.restoreState()


            SoccerMatchModel soccerMatch = SoccerMatchBuilder.build();
            MemoryEventStore memoryEventStore = new MemoryEventStore();
            MatchHandler matchHandler = new MatchHandler(soccerMatch.getMatch(), memoryEventStore);

            //Restore MatchA
            matchHandler.restoreState(resultA);
            MatchState state = matchHandler.getMatch().getState();
            assertThat("MatchA should be correctly restored.", state, equalTo(MatchState.ended));

            // Check if assigned cards are restored
            boolean frankHasCard = false, frankHasRedCard = false, pietHasCard = false, henkHasCard = false;
View Full Code Here


            SoccerMatchModel soccerMatchB = SoccerMatchBuilder.build();
            MemoryEventStore memoryEventStoreB = new MemoryEventStore();
            MatchHandler matchHandlerB = new MatchHandler(soccerMatchB.getMatch(), memoryEventStoreB);

            //Restore MatchB
            matchHandlerB.restoreState(resultB);
            MatchState stateB = matchHandlerB.getMatch().getState();
            boolean equals = stateB.equals(MatchState.started);
            assertThat("MatchB should be correctly restored.", equals, equalTo(true));
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.