Examples of TestProject


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

     * @param map Map with properties of a Test Project.
     * @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.AUTOMATION_ENABLED.toString()));
                    testProject.setEnableRequirements(getBoolean(optMap,
                            TestLinkResponseParams.REQUIREMENTS_ENABLED.toString()));
                    testProject.setEnableTestPriority(getBoolean(optMap,
                            TestLinkResponseParams.TEST_PRIORITY_ENABLED.toString()));
                    testProject.setEnableInventory(getBoolean(optMap,
                            TestLinkResponseParams.INVENTORY_ENABLED.toString()));

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

            }
        }
        return testProject;
View Full Code Here

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

   * @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

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

   * @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

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

    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 = Util.castToArray(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

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

 
  @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

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

      Object[] responseArray = Util.castToArray(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

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

   * @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

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

   * @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

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

    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

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

 
  @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
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.