Package br.eti.kinoshita.testlinkjavaapi.model

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


      Object[] responseArray = (Object[])response;
      projects = new TestProject[responseArray.length];
      for (int i = 0; i < responseArray.length; i++)
      {
        Map<String, Object> projectMap = (Map<String, Object>)responseArray[i];
        TestProject testProject = Util.getTestProject(projectMap);
        projects[i] = testProject;
      }
     
    }
    catch ( XmlRpcException xmlrpcex )
View Full Code Here


   * @return Test Project.
   */
  @SuppressWarnings("unchecked")
  public static final TestProject getTestProject(Map<String, Object> map)
  {
    TestProject testProject = 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 )
        {
          testProject = new TestProject();
          testProject.setId( id );
         
          testProject.setName( getString(map, TestLinkResponseParams.name.toString()) );
          testProject.setPrefix( getString(map, TestLinkResponseParams.prefix.toString() ) );
          testProject.setNotes( getString(map, TestLinkResponseParams.notes.toString() ) );
         
          Map<String, Object> optMap = (Map<String, Object>)map.get(TestLinkResponseParams.opt.toString());
          testProject.setEnableAutomation( getBoolean(optMap, TestLinkResponseParams.automationEnabled.toString()));
          testProject.setEnableRequirements( getBoolean(optMap, TestLinkResponseParams.requirementsEnabled.toString()));
          testProject.setEnableTestPriority( getBoolean(optMap, TestLinkResponseParams.testPriorityEnabled.toString()));
          testProject.setEnableInventory( getBoolean(optMap, TestLinkResponseParams.inventoryEnabled.toString()));
         
          testProject.setActive( getBoolean(map, TestLinkResponseParams.active.toString()));
          testProject.setPublic( getBoolean(map, TestLinkResponseParams.isPublic.toString()));
        }
       
      }     
    }
    return testProject;
View Full Code Here

   * @return Test Project.
   */
  @SuppressWarnings("unchecked")
  public static final TestProject getTestProject(Map<String, Object> map)
  {
    TestProject testProject = 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 )
        {
          testProject = new TestProject();
          testProject.setId( id );
         
          testProject.setName( getString(map, TestLinkResponseParams.name.toString()) );
          testProject.setPrefix( getString(map, TestLinkResponseParams.prefix.toString() ) );
          testProject.setNotes( getString(map, TestLinkResponseParams.notes.toString() ) );
         
          Map<String, Object> optMap = (Map<String, Object>)map.get(TestLinkResponseParams.opt.toString());
          testProject.setEnableAutomation( getBoolean(optMap, TestLinkResponseParams.automationEnabled.toString()));
          testProject.setEnableRequirements( getBoolean(optMap, TestLinkResponseParams.requirementsEnabled.toString()));
          testProject.setEnableTestPriority( getBoolean(optMap, TestLinkResponseParams.testPriorityEnabled.toString()));
          testProject.setEnableInventory( getBoolean(optMap, TestLinkResponseParams.inventoryEnabled.toString()));
         
          testProject.setActive( getBoolean(map, TestLinkResponseParams.active.toString()));
          testProject.setPublic( getBoolean(map, TestLinkResponseParams.isPublic.toString()));
        }
       
      }     
    }
    return testProject;
View Full Code Here

    Boolean isActive,
    Boolean isPublic
  )
  throws TestLinkAPIException
  {
    TestProject testProject = null;
   
    Integer id = 0;
   
    testProject = new TestProject(
        id,
        testProjectName,
        testProjectPrefix,
        notes,
        enableRequirements,
        enableTestPriority,
        enableAutomation,
        enableInventory,
        isActive,
        isPublic);
   
    try
    {
      Map<String, Object> executionData = Util.getTestProjectMap(testProject);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.createTestProject.toString(), executionData);
      Object[] responseArray = (Object[])response;
      Map<String, Object> responseMap = (Map<String, Object>)responseArray[0];
     
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      testProject.setId( id );
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error creating test project: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

 
  @SuppressWarnings("unchecked")
  protected TestProject getTestProjectByName(String projectName)
  throws TestLinkAPIException
  {
    TestProject testProject = null;
   
    try
    {
      Map<String, Object> executionData = new HashMap<String, Object>();
      executionData.put(TestLinkParams.testProjectName.toString(), projectName);
View Full Code Here

      Object[] responseArray = (Object[])response;
      projects = new TestProject[responseArray.length];
      for (int i = 0; i < responseArray.length; i++)
      {
        Map<String, Object> projectMap = (Map<String, Object>)responseArray[i];
        TestProject testProject = Util.getTestProject(projectMap);
        projects[i] = testProject;
      }
     
    }
    catch ( XmlRpcException xmlrpcex )
View Full Code Here

    Boolean isActive,
    Boolean isPublic
  )
  throws TestLinkAPIException
  {
    TestProject testProject = null;
   
    Integer id = 0;
   
    testProject = new TestProject(
        id,
        testProjectName,
        testProjectPrefix,
        notes,
        enableRequirements,
        enableTestPriority,
        enableAutomation,
        enableInventory,
        isActive,
        isPublic);
   
    try
    {
      Map<String, Object> executionData = Util.getTestProjectMap(testProject);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.createTestProject.toString(), executionData);
      Object[] responseArray = (Object[])response;
      Map<String, Object> responseMap = (Map<String, Object>)responseArray[0];
     
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      testProject.setId( id );
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error creating test project: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

 
  @SuppressWarnings("unchecked")
  protected TestProject getTestProjectByName(String projectName)
  throws TestLinkAPIException
  {
    TestProject testProject = null;
   
    try
    {
      Map<String, Object> executionData = new HashMap<String, Object>();
      executionData.put(TestLinkParams.testProjectName.toString(), projectName);
View Full Code Here

      Object[] responseArray = (Object[])response;
      projects = new TestProject[responseArray.length];
      for (int i = 0; i < responseArray.length; i++)
      {
        Map<String, Object> projectMap = (Map<String, Object>)responseArray[i];
        TestProject testProject = Util.getTestProject(projectMap);
        projects[i] = testProject;
      }
     
    }
    catch ( XmlRpcException xmlrpcex )
View Full Code Here

   * @return Test Project.
   */
  @SuppressWarnings("unchecked")
  public static final TestProject getTestProject(Map<String, Object> map)
  {
    TestProject testProject = 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 )
        {
          testProject = new TestProject();
          testProject.setId( id );
         
          testProject.setName( getString(map, TestLinkResponseParams.name.toString()) );
          testProject.setPrefix( getString(map, TestLinkResponseParams.prefix.toString() ) );
          testProject.setNotes( getString(map, TestLinkResponseParams.notes.toString() ) );
         
          Map<String, Object> optMap = (Map<String, Object>)map.get(TestLinkResponseParams.opt.toString());
          testProject.setEnableAutomation( getBoolean(optMap, TestLinkResponseParams.automationEnabled.toString()));
          testProject.setEnableRequirements( getBoolean(optMap, TestLinkResponseParams.requirementsEnabled.toString()));
          testProject.setEnableTestPriority( getBoolean(optMap, TestLinkResponseParams.testPriorityEnabled.toString()));
          testProject.setEnableInventory( getBoolean(optMap, TestLinkResponseParams.inventoryEnabled.toString()));
         
          testProject.setActive( getBoolean(map, TestLinkResponseParams.active.toString()));
          testProject.setPublic( getBoolean(map, TestLinkResponseParams.isPublic.toString()));
        }
       
      }     
    }
    return testProject;
View Full Code Here

TOP

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

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.