Package org.soybeanMilk.web.exe

Examples of org.soybeanMilk.web.exe.WebAction$Target


        gen.setNotBefore(new Date(System.currentTimeMillis() - 50000));
        gen.setNotAfter(new Date(System.currentTimeMillis() + 50000));
        gen.setSerialNumber(BigInteger.valueOf(1));
        gen.setSignatureAlgorithm("SHA1WithRSAEncryption");

        Target targetName = new Target(Target.targetName, new GeneralName(GeneralName.dNSName,
            "www.test.com"));

        Target targetGroup = new Target(Target.targetGroup, new GeneralName(
            GeneralName.directoryName, "o=Test, ou=Test"));
        Target[] targets = new Target[2];
        targets[0] = targetName;
        targets[1] = targetGroup;
        TargetInformation targetInformation = new TargetInformation(targets);
View Full Code Here


        gen.setNotBefore(new Date(System.currentTimeMillis() - 50000));
        gen.setNotAfter(new Date(System.currentTimeMillis() + 50000));
        gen.setSerialNumber(BigInteger.ONE);
        gen.setSignatureAlgorithm("SHA1WithRSAEncryption");

        Target targetName = new Target(Target.targetName, new GeneralName(GeneralName.dNSName,
            "www.test.com"));

        Target targetGroup = new Target(Target.targetGroup, new GeneralName(
            GeneralName.directoryName, "o=Test, ou=Test"));
        Target[] targets = new Target[2];
        targets[0] = targetName;
        targets[1] = targetGroup;
        TargetInformation targetInformation = new TargetInformation(targets);
View Full Code Here

    parser.parse("org/soybeanMilk/test/unit/web/TestWebConfigurationParser-0.xml");
   
    WebConfiguration webConfiguration= parser.getWebConfiguration();
   
    {
      WebAction ac=(WebAction)webConfiguration.getExecutable("exe0");
      Assert.assertNull(ac.getTarget().getUrl());
      Assert.assertEquals(Target.FORWARD, ac.getTarget().getType());
    }
    {
      WebAction ac=(WebAction)webConfiguration.getExecutable("exe1");
      Assert.assertEquals("url", ac.getTarget().getUrl());
      Assert.assertEquals(Target.FORWARD, ac.getTarget().getType());
    }
    {
      WebAction ac=(WebAction)webConfiguration.getExecutable("exe2");
      Assert.assertNull(ac.getTarget().getUrl());
      Assert.assertEquals("json", ac.getTarget().getType());
    }
    {
      WebAction ac=(WebAction)webConfiguration.getExecutable("exe3");
      Assert.assertNull(ac.getTarget().getUrl());
      Assert.assertEquals("JSON", ac.getTarget().getType());
    }
  }
View Full Code Here

 
  @Test
  public void getAllInvokeResultKey() throws Exception
  {
    String[] expected={"result0", "request.result1", "session.result2", "application.result3", "request.result5", "request.result4"};
    WebAction webAction=(WebAction)webConfiguration.getExecutable("exe1");
   
    String[] re=abstractTargetHandler.getAllResultKeys(webAction);
   
    for(int i=0;i<expected.length;i++)
    {
View Full Code Here

 
  @Test
  public void getActualTargetUrl() throws Exception
  {
    WebObjectSource os=createWebObjectSource();
    WebAction webAction=(WebAction)webConfiguration.getExecutable("exe3");
   
    os.set("request.v0", "v0");
    os.set("request.v1", "v1");
   
    Assert.assertEquals("v0/v1/aaa/null/bbb.jsp", abstractTargetHandler.getActualTargetUrl(webAction, os));
View Full Code Here

  }
 
  //@Override
  protected Action createActionIntance()
  {
    return new WebAction();
  }
View Full Code Here

TOP

Related Classes of org.soybeanMilk.web.exe.WebAction$Target

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.