Package match.handler

Examples of match.handler.MatchHandler.handle()


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

        // Start
        matchHandler.handle(new StartMatchCommand(matchId));


        // Give cards
        for (PlayerModel playerModel : soccerMatch.getPlayerSet()) {
            if (playerModel.getPlayerName().equals("frank")) {
View Full Code Here



        // Give cards
        for (PlayerModel playerModel : soccerMatch.getPlayerSet()) {
            if (playerModel.getPlayerName().equals("frank")) {
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
            }
            if (playerModel.getPlayerName().equals("piet")) { // assign two yellow cards
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
            }
View Full Code Here

        for (PlayerModel playerModel : soccerMatch.getPlayerSet()) {
            if (playerModel.getPlayerName().equals("frank")) {
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
            }
            if (playerModel.getPlayerName().equals("piet")) { // assign two yellow cards
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
            }
            if (playerModel.getPlayerName().equals("henk")) {
                matchHandler.handle(new AssignRedCardCommand(matchId, playerModel));
            }
View Full Code Here

            if (playerModel.getPlayerName().equals("frank")) {
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
            }
            if (playerModel.getPlayerName().equals("piet")) { // assign two yellow cards
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
            }
            if (playerModel.getPlayerName().equals("henk")) {
                matchHandler.handle(new AssignRedCardCommand(matchId, playerModel));
            }
View Full Code Here

            if (playerModel.getPlayerName().equals("piet")) { // assign two yellow cards
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
                matchHandler.handle(new AssignYellowCardCommand(matchId, playerModel));
            }
            if (playerModel.getPlayerName().equals("henk")) {
                matchHandler.handle(new AssignRedCardCommand(matchId, playerModel));
            }

        }

        matchHandler.handle(new EndMatchCommand(matchId));
View Full Code Here

                matchHandler.handle(new AssignRedCardCommand(matchId, playerModel));
            }

        }

        matchHandler.handle(new EndMatchCommand(matchId));
        return memoryEventStore.loadEventStream(matchId);
    }

    private MemoryEventStream testMatchB() {
        SoccerMatchModel soccerMatch = SoccerMatchBuilder.build();
View Full Code Here

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

        // Start
        matchHandler.handle(new StartMatchCommand(matchId));

        return memoryEventStore.loadEventStream(matchId);
    }

    @Test
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.