Package br.eti.kinoshita.testlinkjavaapi.model

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


   * @param map
   * @return
   */
  public static final TestCase getTestCase(Map<String, Object> map)
  {
    TestCase testCase = 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 )
        {
          testCase = new TestCase();
          testCase.setId( id );
          testCase.setVersionId( getInteger(map, TestLinkResponseParams.testCaseVersionId.toString()) );
          testCase.setVersion( getInteger(map, TestLinkResponseParams.version.toString() ) );
          testCase.setPreconditions( getString(map, TestLinkResponseParams.preconditions.toString()));
          testCase.setSummary( getString(map, TestLinkResponseParams.summary.toString()) );
          testCase.setParentId( getInteger(map, TestLinkResponseParams.parentId.toString() ) );
          testCase.setOrder( getInteger(map, TestLinkResponseParams.order.toString() ) );
          testCase.setName( getString(map, TestLinkResponseParams.name.toString()));
          Integer executionTypeValue = getInteger(map, TestLinkResponseParams.executionType.toString());
          ExecutionType execution = ExecutionType.getExecutionType( executionTypeValue );
          testCase.setExecutionType( execution );
         
          // TODO: check if TL 2.0 allows it
//          CustomField[] customFields = (CustomField[])getArray(map, TestLinkResponseParams.customFields.toString());
//          if ( customFields != null )
//          {
View Full Code Here


      Integer internalId,
      Boolean checkDuplicatedName,
      String actionOnDuplicatedName)
  throws TestLinkAPIException
  {
    TestCase testCase = null;
   
    Integer id = null;
   
    testCase = new TestCase(
      id,
      testCaseName,
      testSuiteId,
      testProjectId,
      authorLogin,
      summary,
      steps,
      preconditions,
      importance,
      execution,
      order,
      internalId,
      checkDuplicatedName,
      actionOnDuplicatedName,
      null,
      null,
      null,
      null,
      null);
   
    try
    {
      Map<String, Object> executionData = Util.getTestCaseMap(testCase);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.createTestCase.toString(), executionData);
      Object[] responseArray = (Object[])response;
      Map<String, Object> responseMap = (Map<String, Object>)responseArray[0];
     
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      testCase.setId( id );
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error creating test plan: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

  protected TestCase getTestCase(Integer testCaseId,
                   Integer testCaseExternalId,
                   Integer version)
  throws TestLinkAPIException
  {
    TestCase testCase = null;
   
    try
    {
      Map<String, Object> executionData = new HashMap<String, Object>();
     
View Full Code Here

TOP

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

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.