Examples of BluePrint


Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

        checkBlueprintTaskServlet = new CheckBlueprintTaskServlet(blueprintDao, characterDao);
    }

    @Test
    public void testDoPost() throws Exception {
        Blueprint blueprint = new Blueprint();
        CharacterInfo attachedCharacterInfo = new CharacterInfo();
        attachedCharacterInfo.setId(2L);
        Character character = new Character();
        character.setCharacterID(3L);
        character.setName("characterName");
        character.setCorporationID(4L);
        character.setCorporationName("corporationName");
        character.setCorporationTicker("corporationTicker");
        character.setAllianceID(5L);
        character.setAllianceName("allianceName");
        blueprint.setAttachedCharacterInfo(attachedCharacterInfo);
        when(httpServletRequest.getParameter("blueprintID")).thenReturn("1");
        when(blueprintDao.get(new Key<Blueprint>(Blueprint.class, 1))).thenReturn(blueprint);
        when(characterDao.get(new Key<Character>(Character.class, 2))).thenReturn(character);
        checkBlueprintTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(blueprintDao).putWithoutChecks(blueprint);
View Full Code Here

Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

        assertEquals("allianceName", attachedCharacterInfo.getAllianceName());
    }

    @Test
    public void testDoPost_WrongCharacter() throws Exception {
        Blueprint blueprint = new Blueprint();
        CharacterInfo attachedCharacterInfo = new CharacterInfo();
        attachedCharacterInfo.setId(2L);
        blueprint.setAttachedCharacterInfo(attachedCharacterInfo);
        when(httpServletRequest.getParameter("blueprintID")).thenReturn("1");
        when(blueprintDao.get(new Key<Blueprint>(Blueprint.class, 1))).thenReturn(blueprint);
        when(characterDao.get(new Key<Character>(Character.class, 2))).thenThrow(new NotFoundException(null));
        checkBlueprintTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(blueprintDao).putWithoutChecks(blueprint);
        assertNull(blueprint.getAttachedCharacterInfo());
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

        assertNull(blueprint.getAttachedCharacterInfo());
    }

    @Test
    public void testDoPost_NoCharacter() throws Exception {
        Blueprint blueprint = new Blueprint();
        when(httpServletRequest.getParameter("blueprintID")).thenReturn("1");
        when(blueprintDao.get(new Key<Blueprint>(Blueprint.class, 1))).thenReturn(blueprint);
        checkBlueprintTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(blueprintDao, never()).putWithoutChecks(blueprint);
    }
View Full Code Here

Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

    @Test
    public void testLaunchForDelete() {
        when(googleAppEngineServices.getQueue("default")).thenReturn(queue);
        List<Blueprint> blueprints = new ArrayList<Blueprint>();
        Blueprint blueprint1 = new Blueprint();
        Blueprint blueprint2 = new Blueprint();
        blueprints.add(blueprint1);
        blueprints.add(blueprint2);
        when(blueprintDao.getAll(new Key<User>(User.class, 1L), 2L)).thenReturn(blueprints);
        updateBlueprintTaskLauncher.launchForDelete(1L, 2L);
        verify(queue, times(2)).add(any(TaskOptions.class));
View Full Code Here

Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

        when(googleAppEngineServices.getQueue("default")).thenReturn(queue);
        Character character = new Character();
        character.setCharacterID(1L);
        character.setName("characterName");
        List<Blueprint> blueprints = new ArrayList<Blueprint>();
        Blueprint blueprint1 = new Blueprint();
        blueprint1.setId(2L);
        Blueprint blueprint2 = new Blueprint();
        blueprint2.setId(3L);
        blueprints.add(blueprint1);
        blueprints.add(blueprint2);
        when(blueprintDao.getAll(new Key<User>(User.class, 4L), 1L)).thenReturn(blueprints);
        updateBlueprintTaskLauncher.launchForDetach(4L, character);
        verify(queue, times(2)).add(any(TaskOptions.class));
View Full Code Here

Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

        character.setCorporationName("corporationName");
        character.setCorporationTicker("corporationTicker");
        character.setAllianceID(3L);
        character.setAllianceName("allianceName");
        List<Blueprint> blueprints = new ArrayList<Blueprint>();
        Blueprint blueprint1 = new Blueprint();
        blueprint1.setId(4L);
        Blueprint blueprint2 = new Blueprint();
        blueprint2.setId(5L);
        blueprints.add(blueprint1);
        blueprints.add(blueprint2);
        when(blueprintDao.getAll(new Key<User>(User.class, 4L), 1L)).thenReturn(blueprints);
        updateBlueprintTaskLauncher.launchForUpdate(4L, character);
        verify(queue, times(2)).add(any(TaskOptions.class));
View Full Code Here

Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

        when(googleAppEngineServices.getQueue("default")).thenReturn(queue);
        Character character = new Character();
        character.setCharacterID(1L);
        character.setName("characterName");
        List<Blueprint> blueprints = new ArrayList<Blueprint>();
        Blueprint blueprint1 = new Blueprint();
        blueprint1.setId(4L);
        Blueprint blueprint2 = new Blueprint();
        blueprint2.setId(5L);
        blueprints.add(blueprint1);
        blueprints.add(blueprint2);
        when(blueprintDao.getAll(new Key<User>(User.class, 4L), 1L)).thenReturn(blueprints);
        updateBlueprintTaskLauncher.launchForUpdate(4L, character);
        verify(queue, times(2)).add(any(TaskOptions.class));
View Full Code Here

Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

        character.setName("characterName");
        character.setCorporationID(2L);
        character.setCorporationName("corporationName");
        character.setCorporationTicker("corporationTicker");
        List<Blueprint> blueprints = new ArrayList<Blueprint>();
        Blueprint blueprint1 = new Blueprint();
        blueprint1.setId(4L);
        Blueprint blueprint2 = new Blueprint();
        blueprint2.setId(5L);
        blueprints.add(blueprint1);
        blueprints.add(blueprint2);
        when(blueprintDao.getAll(new Key<User>(User.class, 4L), 1L)).thenReturn(blueprints);
        updateBlueprintTaskLauncher.launchForUpdate(4L, character);
        verify(queue, times(2)).add(any(TaskOptions.class));
View Full Code Here

Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

        updateBlueprintTaskServlet = new UpdateBlueprintTaskServlet(blueprintDao);
    }

    @Test
    public void testDoPost() throws Exception {
        Blueprint blueprint = new Blueprint();
        when(blueprintDao.get(2L, new Key<User>(User.class, 1L))).thenReturn(blueprint);
        when(httpServletRequest.getParameter("userID")).thenReturn("1");
        when(httpServletRequest.getParameter("blueprintID")).thenReturn("2");
        when(httpServletRequest.getParameter("characterID")).thenReturn("3");
        when(httpServletRequest.getParameter("characterName")).thenReturn("characterName");
        when(httpServletRequest.getParameter("corporationID")).thenReturn("4");
        when(httpServletRequest.getParameter("corporationName")).thenReturn("corporationName");
        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());
View Full Code Here

Examples of lv.odylab.evemanage.domain.blueprint.Blueprint

        assertEquals("allianceName", characterInfo.getAllianceName());
    }

    @Test
    public void testDoPost_NoCorporation() throws Exception {
        Blueprint blueprint = new Blueprint();
        when(blueprintDao.get(2L, new Key<User>(User.class, 1L))).thenReturn(blueprint);
        when(httpServletRequest.getParameter("userID")).thenReturn("1");
        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());
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.