Package org.newinstance.gucoach.model

Examples of org.newinstance.gucoach.model.Player


        Assert.assertEquals(date1, date);
    }

    @Test
    public void insertAndDeletePlayerHistoryTest() {
        final Player player = createPlayer();

        final PlayerHistory playerHistory1 = createPlayerHistory(player);
        playerHistory1.setPlayer(player);

        em.getTransaction().begin();
View Full Code Here


        playerService = new PlayerService(em);
    }

    @Test
    public void insertPlayerTest() {
        final Player player = createPlayer();

        em.getTransaction().begin();
        playerService.insertPlayer(player);
        em.getTransaction().commit();

        final Player result = playerService.findPlayerById(player.getId());
        Assert.assertNotNull(result);
        Assert.assertEquals("Foobar", player.getLastName());
        Assert.assertEquals(185, player.getHeight().intValue());
    }
View Full Code Here

        Assert.assertEquals(185, player.getHeight().intValue());
    }

    @Test
    public void removePlayerTest() {
        final Player player = createPlayer();

        final List<Player> players = new ArrayList<Player>();
        players.add(player);

        em.getTransaction().begin();
View Full Code Here

     * Creates and returns a new {@link Player} entity.
     *
     * @return a new entity
     */
    protected Player createPlayer() {
        final Player player = new Player();
        player.setId(7654321L);
        player.setBirthday("08.08");
        player.setCountry(Country.CH);
        player.setHeight(185);
        player.setLastName("Foobar");
        player.setPersonality("hardworking");
        player.setStrongFoot(StrongFoot.L);
        player.setFirstName("John");
        player.setImportDate(new Date());
        return player;
    }
View Full Code Here

     *
     * @param playerId the player's id
     * @return a new entity
     */
    protected Player createPlayer(final Long playerId) {
        final Player player = new Player();
        player.setId(playerId);
        player.setBirthday("08.08");
        player.setCountry(Country.CH);
        player.setHeight(185);
        player.setLastName("Foobar");
        player.setPersonality("hardworking");
        player.setStrongFoot(StrongFoot.L);
        player.setFirstName("John");
        player.setImportDate(new Date());
        return player;
    }
View Full Code Here

TOP

Related Classes of org.newinstance.gucoach.model.Player

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.