Examples of CharacterInfo


Examples of lv.odylab.evemanage.domain.user.CharacterInfo

    @Test
    public void testSetMainCharacter() {
        Key<lv.odylab.evemanage.domain.user.User> userKey = new Key<lv.odylab.evemanage.domain.user.User>(lv.odylab.evemanage.domain.user.User.class, 1);
        lv.odylab.evemanage.domain.user.User user = new lv.odylab.evemanage.domain.user.User();
        List<CharacterInfo> characterInfos = new ArrayList<CharacterInfo>();
        CharacterInfo characterInfo1 = new CharacterInfo();
        characterInfo1.setId(1L);
        characterInfo1.setName("characterName1");
        CharacterInfo characterInfo2 = new CharacterInfo();
        characterInfo2.setId(2L);
        characterInfo2.setName("characterName2");
        characterInfos.add(characterInfo1);
        characterInfos.add(characterInfo2);
        user.setCharacterInfos(characterInfos);

        when(userDao.get(userKey)).thenReturn(user);
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

    @Test
    public void testSetMainCharacter_NotExisting() {
        Key<lv.odylab.evemanage.domain.user.User> userKey = new Key<lv.odylab.evemanage.domain.user.User>(lv.odylab.evemanage.domain.user.User.class, 1);
        lv.odylab.evemanage.domain.user.User user = new lv.odylab.evemanage.domain.user.User();
        List<CharacterInfo> characterInfos = new ArrayList<CharacterInfo>();
        CharacterInfo characterInfo1 = new CharacterInfo();
        characterInfo1.setName("characterName1");
        characterInfos.add(characterInfo1);
        user.setCharacterInfos(characterInfos);

        when(userDao.get(userKey)).thenReturn(user);
        userManagementService.setMainCharacter("characterNameX", userKey);
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

    @Test
    public void testSynchronizeMainCharacter_NoCharacters_WithMainCharacter() {
        Key<User> userKey = new Key<User>(User.class, 1);
        User user = new User();
        CharacterInfo characterInfo = new CharacterInfo();
        characterInfo.setId(1L);
        characterInfo.setCharacterID(1L);
        user.setMainCharacterInfo(characterInfo);
        List<Character> characters = new ArrayList<Character>();

        when(userDao.get(userKey)).thenReturn(user);
        when(characterDao.getAll(userKey)).thenReturn(characters);
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

    @Test
    public void testSynchronizeMainCharacter_TwoCharacters_WithMainCharacter() {
        Key<User> userKey = new Key<User>(User.class, 1);
        User user = new User();
        CharacterInfo characterInfo = new CharacterInfo();
        characterInfo.setId(2L);
        characterInfo.setCharacterID(2L);
        user.setMainCharacterInfo(characterInfo);
        List<Character> characters = new ArrayList<Character>();
        Character character1 = new Character();
        character1.setId(1L);
        character1.setCharacterID(1L);
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

    @Test
    public void testSynchronizeMainCharacter_TwoCharacters_NotExistingMainCharacter() {
        Key<User> userKey = new Key<User>(User.class, 1);
        User user = new User();
        CharacterInfo characterInfo = new CharacterInfo();
        characterInfo.setId(3L);
        characterInfo.setCharacterID(3L);
        user.setMainCharacterInfo(characterInfo);
        List<Character> characters = new ArrayList<Character>();
        Character character1 = new Character();
        character1.setId(1L);
        character1.setCharacterID(1L);
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

        when(httpServletRequest.getParameter("corporationTicker")).thenReturn("corporationTicker");
        when(httpServletRequest.getParameter("allianceID")).thenReturn("5");
        when(httpServletRequest.getParameter("allianceName")).thenReturn("allianceName");
        updateBlueprintTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(blueprintDao).putWithoutChecks(blueprint);
        CharacterInfo characterInfo = blueprint.getAttachedCharacterInfo();
        assertNotNull(characterInfo);
        assertEquals(Long.valueOf(3), characterInfo.getCharacterID());
        assertEquals("characterName", characterInfo.getName());
        assertEquals(Long.valueOf(4), characterInfo.getCorporationID());
        assertEquals("corporationName", characterInfo.getCorporationName());
        assertEquals("corporationTicker", characterInfo.getCorporationTicker());
        assertEquals(Long.valueOf(5), characterInfo.getAllianceID());
        assertEquals("allianceName", characterInfo.getAllianceName());
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

        when(httpServletRequest.getParameter("blueprintID")).thenReturn("2");
        when(httpServletRequest.getParameter("characterID")).thenReturn("3");
        when(httpServletRequest.getParameter("characterName")).thenReturn("characterName");
        updateBlueprintTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(blueprintDao).putWithoutChecks(blueprint);
        CharacterInfo characterInfo = blueprint.getAttachedCharacterInfo();
        assertNotNull(characterInfo);
        assertEquals(Long.valueOf(3), characterInfo.getCharacterID());
        assertEquals("characterName", characterInfo.getName());
        assertNull(characterInfo.getCorporationID());
        assertNull(characterInfo.getCorporationName());
        assertNull(characterInfo.getCorporationTicker());
        assertNull(characterInfo.getAllianceID());
        assertNull(characterInfo.getAllianceName());
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

        when(httpServletRequest.getParameter("corporationID")).thenReturn("4");
        when(httpServletRequest.getParameter("corporationName")).thenReturn("corporationName");
        when(httpServletRequest.getParameter("corporationTicker")).thenReturn("corporationTicker");
        updateBlueprintTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(blueprintDao).putWithoutChecks(blueprint);
        CharacterInfo characterInfo = blueprint.getAttachedCharacterInfo();
        assertNotNull(characterInfo);
        assertEquals(Long.valueOf(3), characterInfo.getCharacterID());
        assertEquals("characterName", characterInfo.getName());
        assertEquals(Long.valueOf(4), characterInfo.getCorporationID());
        assertEquals("corporationName", characterInfo.getCorporationName());
        assertEquals("corporationTicker", characterInfo.getCorporationTicker());
        assertNull(characterInfo.getAllianceID());
        assertNull(characterInfo.getAllianceName());
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

                .order("name").list();
    }

    public PriceSet getForCorporationByPriceSetID(Long priceSetID, Key<User> userKey) {
        User user = objectifyFactory.begin().get(userKey);
        CharacterInfo mainCharacterInfo = user.getMainCharacterInfo();
        return objectifyFactory.begin().query(PriceSet.class)
                .filter("attachedCharacterInfo.corporationID", mainCharacterInfo.getCorporationID())
                .filter("id", priceSetID).get();
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.user.CharacterInfo

                .filter("id", priceSetID).get();
    }

    public PriceSet getForAllianceByPriceSetID(Long priceSetID, Key<User> userKey) {
        User user = objectifyFactory.begin().get(userKey);
        CharacterInfo mainCharacterInfo = user.getMainCharacterInfo();
        return objectifyFactory.begin().query(PriceSet.class)
                .filter("attachedCharacterInfo.allianceID", mainCharacterInfo.getAllianceID())
                .filter("id", priceSetID).get();
    }
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.