Package br.eti.kinoshita.testlinkjavaapi.model

Examples of br.eti.kinoshita.testlinkjavaapi.model.TestPlan


    /**
     * @param map
     * @return Test Plan.
     */
    public static final TestPlan getTestPlan(Map<String, Object> map) {
        TestPlan testPlan = null;
        if (map != null && map.size() > 0) {
            Object o = map.get(TestLinkResponseParams.ID.toString());
            if (o != null) {
                Integer id = Integer.parseInt(o.toString());

                if (id > 0) {
                    testPlan = new TestPlan();
                    testPlan.setId(id);

                    testPlan.setName(getString(map, TestLinkResponseParams.NAME.toString()));
                    testPlan.setProjectName(getString(map, TestLinkResponseParams.PROJECT_NAME.toString()));
                    testPlan.setNotes(getString(map, TestLinkResponseParams.NOTES.toString()));

                    testPlan.setActive(getBoolean(map, TestLinkResponseParams.ACTIVE.toString()));
                    testPlan.setPublic(getBoolean(map, TestLinkResponseParams.IS_PUBLIC.toString()));
                }

            }
        }
        return testPlan;
View Full Code Here


   * @param map
   * @return Test Plan.
   */
  public static final TestPlan getTestPlan( Map<String, Object> map )
  {
    TestPlan testPlan = null;
    if ( map != null && map.size() > 0 )
    {
      Object o = map.get( TestLinkResponseParams.id.toString());
      if ( o != null )
      {
        Integer id = Integer.parseInt( o.toString() );
       
        if ( id > 0 )
        {
          testPlan = new TestPlan();
          testPlan.setId( id );
         
          testPlan.setName( getString(map, TestLinkResponseParams.name.toString()) );
          testPlan.setProjectName( getString(map, TestLinkResponseParams.projectName.toString() ) );
          testPlan.setNotes( getString(map, TestLinkResponseParams.notes.toString() ) );
         
          testPlan.setActive( getBoolean(map, TestLinkResponseParams.active.toString()));
          testPlan.setPublic( getBoolean(map, TestLinkResponseParams.isPublic.toString()));
        }
       
      }     
    }
    return testPlan;
View Full Code Here

   * @param map
   * @return
   */
  public static final TestPlan getTestPlan( Map<String, Object> map )
  {
    TestPlan testPlan = null;
    if ( map != null && map.size() > 0 )
    {
      Object o = map.get( TestLinkResponseParams.id.toString());
      if ( o != null )
      {
        Integer id = Integer.parseInt( o.toString() );
       
        if ( id > 0 )
        {
          testPlan = new TestPlan();
          testPlan.setId( id );
         
          testPlan.setName( getString(map, TestLinkResponseParams.name.toString()) );
          testPlan.setProjectName( getString(map, TestLinkResponseParams.projectName.toString() ) );
          testPlan.setNotes( getString(map, TestLinkResponseParams.notes.toString() ) );
         
          testPlan.setActive( getBoolean(map, TestLinkResponseParams.active.toString()));
          testPlan.setPublic( getBoolean(map, TestLinkResponseParams.isPublic.toString()));
        }
       
      }     
    }
    return testPlan;
View Full Code Here

      Object[] responseArray = Util.castToArray(response);
      testPlans = new TestPlan[responseArray.length];
      for (int i = 0; i < responseArray.length; i++)
      {
        Map<String, Object> planMap = (Map<String, Object>)responseArray[i];
        TestPlan testPlan = Util.getTestPlan(planMap);
        testPlans[i] = testPlan;
      }
     
    }
    catch ( XmlRpcException xmlrpcex )
View Full Code Here

   * @param map
   * @return Test Plan.
   */
  public static final TestPlan getTestPlan( Map<String, Object> map )
  {
    TestPlan testPlan = null;
    if ( map != null && map.size() > 0 )
    {
      Object o = map.get( TestLinkResponseParams.id.toString());
      if ( o != null )
      {
        Integer id = Integer.parseInt( o.toString() );
       
        if ( id > 0 )
        {
          testPlan = new TestPlan();
          testPlan.setId( id );
         
          testPlan.setName( getString(map, TestLinkResponseParams.name.toString()) );
          testPlan.setProjectName( getString(map, TestLinkResponseParams.projectName.toString() ) );
          testPlan.setNotes( getString(map, TestLinkResponseParams.notes.toString() ) );
         
          testPlan.setActive( getBoolean(map, TestLinkResponseParams.active.toString()));
          testPlan.setPublic( getBoolean(map, TestLinkResponseParams.isPublic.toString()));
        }
       
      }     
    }
    return testPlan;
View Full Code Here

   * @param map
   * @return Test Plan.
   */
  public static final TestPlan getTestPlan( Map<String, Object> map )
  {
    TestPlan testPlan = null;
    if ( map != null && map.size() > 0 )
    {
      Object o = map.get( TestLinkResponseParams.id.toString());
      if ( o != null )
      {
        Integer id = Integer.parseInt( o.toString() );
       
        if ( id > 0 )
        {
          testPlan = new TestPlan();
          testPlan.setId( id );
         
          testPlan.setName( getString(map, TestLinkResponseParams.name.toString()) );
          testPlan.setProjectName( getString(map, TestLinkResponseParams.projectName.toString() ) );
          testPlan.setNotes( getString(map, TestLinkResponseParams.notes.toString() ) );
         
          testPlan.setActive( getBoolean(map, TestLinkResponseParams.active.toString()));
          testPlan.setPublic( getBoolean(map, TestLinkResponseParams.isPublic.toString()));
        }
       
      }     
    }
    return testPlan;
View Full Code Here

      String notes,
      Boolean isActive, 
      Boolean isPublic)
  throws TestLinkAPIException
  {
    TestPlan testPlan = null;
   
    Integer id = 0;
   
    testPlan = new TestPlan(
        id,
        planName,
        projectName,
        notes,
        isActive,
        isPublic);
   
    try
    {
      Map<String, Object> executionData = Util.getTestPlanMap(testPlan);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.createTestPlan.toString(), executionData);
      Object[] responseArray = (Object[])response;
      Map<String, Object> responseMap = (Map<String, Object>)responseArray[0];
     
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      testPlan.setId( id );
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error creating test plan: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

   */
  @SuppressWarnings("unchecked")
  protected TestPlan getTestPlanByName(String planName, String projectName)
  throws TestLinkAPIException
  {
    TestPlan testPlan = null;
   
    try
    {
      Map<String, Object> executionData = new HashMap<String, Object>();
      executionData.put(TestLinkParams.testPlanName.toString(), planName);
View Full Code Here

      Object[] responseArray = (Object[])response;
      testPlans = new TestPlan[responseArray.length];
      for (int i = 0; i < responseArray.length; i++)
      {
        Map<String, Object> planMap = (Map<String, Object>)responseArray[i];
        TestPlan testPlan = Util.getTestPlan(planMap);
        testPlans[i] = testPlan;
      }
     
    }
    catch ( XmlRpcException xmlrpcex )
View Full Code Here

   * @param map
   * @return
   */
  public static final TestPlan getTestPlan( Map<String, Object> map )
  {
    TestPlan testPlan = null;
    if ( map != null && map.size() > 0 )
    {
      Object o = map.get( TestLinkResponseParams.id.toString());
      if ( o != null )
      {
        Integer id = Integer.parseInt( o.toString() );
       
        if ( id > 0 )
        {
          testPlan = new TestPlan();
          testPlan.setId( id );
         
          testPlan.setName( getString(map, TestLinkResponseParams.name.toString()) );
          testPlan.setProjectName( getString(map, TestLinkResponseParams.projectName.toString() ) );
          testPlan.setNotes( getString(map, TestLinkResponseParams.notes.toString() ) );
         
          testPlan.setActive( getBoolean(map, TestLinkResponseParams.active.toString()));
          testPlan.setPublic( getBoolean(map, TestLinkResponseParams.isPublic.toString()));
        }
       
      }     
    }
    return testPlan;
View Full Code Here

TOP

Related Classes of br.eti.kinoshita.testlinkjavaapi.model.TestPlan

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.