Examples of CharacterInfo


Examples of de.lessvoid.nifty.renderer.lwjgl.render.font.CharacterInfo

    }
    return 0;
  }

  public Integer getCharacterAdvance(final char currentCharacter, final char nextCharacter, final float size) {
    CharacterInfo currentCharacterInfo = font.getChar(currentCharacter);
    if (currentCharacterInfo == null) {
      return null;
    } else {
      return new Integer(
          (int) (currentCharacterInfo.getXadvance() * size + getKerning(currentCharacterInfo, nextCharacter)));
    }
  }
View Full Code Here

Examples of edu.harvard.hul.ois.ots.schemas.TextMD.CharacterInfo

        }
    }

    protected void attachCharacterInfo () {
        if (ci == null) {
            ci = new CharacterInfo ();
            textMD.addCharacterInfo(ci);
        }
    }
View Full Code Here

Examples of edu.harvard.hul.ois.ots.schemas.TextMD.CharacterInfo

        XmlContentConverter conv = new XmlContentConverter ();
        TextMD tmd = (TextMD) conv.toTextMD (textElem);
       
        List<CharacterInfo> chinfos = tmd.getCharacterInfos();
        assertTrue (chinfos.size() == 1);
        CharacterInfo chinfo = chinfos.get(0);
        assertEquals ("US-ASCII", chinfo.getCharset());
        assertEquals ("LF", chinfo.getLinebreak ());
       
        List<MarkupBasis> mkbases = tmd.getMarkupBases();
        assertTrue (mkbases.size () == 1);
        MarkupBasis mkbas = mkbases.get(0);
        assertEquals ("HTML", mkbas.getValue());
View Full Code Here

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

    }

    @Test
    public void testDoPost() throws Exception {
        PriceSet priceSet = new PriceSet();
        CharacterInfo attachedCharacterInfo = new CharacterInfo();
        attachedCharacterInfo.setId(2L);
        lv.odylab.evemanage.domain.eve.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");
        priceSet.setAttachedCharacterInfo(attachedCharacterInfo);
        when(httpServletRequest.getParameter("priceSetID")).thenReturn("1");
        when(priceSetDao.get(new Key<PriceSet>(PriceSet.class, 1))).thenReturn(priceSet);
        when(characterDao.get(new Key<Character>(Character.class, 2))).thenReturn(character);
        checkPriceSetTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(priceSetDao).putWithoutChecks(priceSet);
        assertEquals(Long.valueOf(3), attachedCharacterInfo.getCharacterID());
        assertEquals("characterName", attachedCharacterInfo.getName());
        assertEquals(Long.valueOf(4), attachedCharacterInfo.getCorporationID());
        assertEquals("corporationName", attachedCharacterInfo.getCorporationName());
        assertEquals("corporationTicker", attachedCharacterInfo.getCorporationTicker());
        assertEquals(Long.valueOf(5), attachedCharacterInfo.getAllianceID());
        assertEquals("allianceName", attachedCharacterInfo.getAllianceName());
    }
View Full Code Here

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

    }

    @Test
    public void testDoPost_WrongCharacter() throws Exception {
        PriceSet priceSet = new PriceSet();
        CharacterInfo attachedCharacterInfo = new CharacterInfo();
        attachedCharacterInfo.setId(2L);
        priceSet.setAttachedCharacterInfo(attachedCharacterInfo);
        when(httpServletRequest.getParameter("priceSetID")).thenReturn("1");
        when(priceSetDao.get(new Key<PriceSet>(PriceSet.class, 1))).thenReturn(priceSet);
        when(characterDao.get(new Key<Character>(Character.class, 2))).thenThrow(new NotFoundException(null));
        checkPriceSetTaskServlet.doPost(httpServletRequest, httpServletResponse);
View Full Code Here

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

    }

    @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);
        assertEquals(Long.valueOf(3), attachedCharacterInfo.getCharacterID());
        assertEquals("characterName", attachedCharacterInfo.getName());
        assertEquals(Long.valueOf(4), attachedCharacterInfo.getCorporationID());
        assertEquals("corporationName", attachedCharacterInfo.getCorporationName());
        assertEquals("corporationTicker", attachedCharacterInfo.getCorporationTicker());
        assertEquals(Long.valueOf(5), attachedCharacterInfo.getAllianceID());
        assertEquals("allianceName", attachedCharacterInfo.getAllianceName());
    }
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");
        updatePriceSetTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(priceSetDao).putWithoutChecks(priceSet);
        CharacterInfo characterInfo = priceSet.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("priceSetID")).thenReturn("2");
        when(httpServletRequest.getParameter("characterID")).thenReturn("3");
        when(httpServletRequest.getParameter("characterName")).thenReturn("characterName");
        updatePriceSetTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(priceSetDao).putWithoutChecks(priceSet);
        CharacterInfo characterInfo = priceSet.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

    }

    @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);
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");
        updatePriceSetTaskServlet.doPost(httpServletRequest, httpServletResponse);
        verify(priceSetDao).putWithoutChecks(priceSet);
        CharacterInfo characterInfo = priceSet.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
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.