Package org.kapott.hbci.manager.ChallengeInfo

Examples of org.kapott.hbci.manager.ChallengeInfo.Param


   */
  @Test
  public void testWrt()
  {
    HhdVersion version = null;
    Param p            = null;
    String code        = "HKAOM";
   
   
    version = getHhdVersion(code,ChallengeInfo.VERSION_HHD_1_2);
    p = version.getParams().get(1);
    Assert.assertEquals(p.getPath(),"BTG.value");
    Assert.assertEquals(p.getType(),"Wrt");
    Assert.assertEquals(p.format("100"),"100,");
    Assert.assertEquals(p.format("100.50"),"100,5");
    Assert.assertEquals(p.format("100.99"),"100,99");
    Assert.assertNull(p.format(null));
   
    version = getHhdVersion(code,ChallengeInfo.VERSION_HHD_1_3);
    p = version.getParams().get(2);
    Assert.assertEquals(p.getPath(),"BTG.value");
    Assert.assertEquals(p.getType(),"Wrt");
    Assert.assertEquals(p.format("100"),"100,");
    Assert.assertEquals(p.format("100.50"),"100,5");
    Assert.assertEquals(p.format("100.99"),"100,99");
    Assert.assertNull(p.format(null));
   

    version = getHhdVersion(code,ChallengeInfo.VERSION_HHD_1_4);
    p = version.getParams().get(0);
    Assert.assertEquals(p.getPath(),"BTG.value");
    Assert.assertEquals(p.getType(),"Wrt");
    Assert.assertEquals(p.format("100"),"100,");
    Assert.assertEquals(p.format("100.50"),"100,5");
    Assert.assertEquals(p.format("100.99"),"100,99");
    Assert.assertNull(p.format(null));
  }
View Full Code Here


   */
  @Test
  public void testAN()
  {
    HhdVersion version = null;
    Param p            = null;
    String code        = "HKAOM";
   
   
    version = getHhdVersion(code,ChallengeInfo.VERSION_HHD_1_2);
    p = version.getParams().get(0);
    Assert.assertEquals(p.getPath(),"Other.number");
    Assert.assertEquals(p.getType(),"");
    Assert.assertEquals(p.format("AaBb"),"AaBb");
   
    // Hier darf KEIN Escaping stattfinden. Das macht HBCI4Java dann spaeter
    // ohnehin beim Zusammenbauen des Segments, da ChallengeKlassParams#param[1-9]
    // ja in hbci-{version}.xml als Type="AN" deklariert sind.
    Assert.assertEquals(p.format("+:'@"),"+:'@");
    Assert.assertNull(p.format(null));
   
    version = getHhdVersion(code,ChallengeInfo.VERSION_HHD_1_3);
    p = version.getParams().get(1);
    Assert.assertEquals(p.getPath(),"Other.number");
    Assert.assertEquals(p.getType(),"");
    Assert.assertEquals(p.format("AaBb"),"AaBb");
    Assert.assertEquals(p.format("+:'@"),"+:'@");
    Assert.assertNull(p.format(null));
   

    version = getHhdVersion(code,ChallengeInfo.VERSION_HHD_1_4);
    p = version.getParams().get(3);
    Assert.assertEquals(p.getPath(),"Other.number");
    Assert.assertEquals(p.getType(),"");
    Assert.assertEquals(p.format("AaBb"),"AaBb");
    Assert.assertEquals(p.format("+:'@"),"+:'@");
    Assert.assertNull(p.format(null));
  }
View Full Code Here

   */
  @Test
  public void testDate() throws Exception
  {
    HhdVersion version = getHhdVersion("HKTUE",ChallengeInfo.VERSION_HHD_1_4);
    Param p = version.getParams().get(3);
    Assert.assertEquals(p.getPath(),"date");
    Assert.assertEquals(p.getType(),"Date");
    Assert.assertEquals(p.format("2011-05-20"),"20110520");
    Assert.assertNull(p.format(null));

    try
    {
      p.format("invalid-date");
      throw new Exception("hier duerfen wir nicht ankommen");
    }
    catch (InitializingException e)
    {
      Assert.assertEquals(InitializingException.class,e.getClass());
View Full Code Here

TOP

Related Classes of org.kapott.hbci.manager.ChallengeInfo.Param

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.