Package br.eti.kinoshita.testlinkjavaapi.model

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


   * @param map
   * @return
   */
  public static final Platform getPlatform(Map<String, Object> map)
  {
    Platform platform = 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 )
        {
          platform = new Platform();
          platform.setId( id );
         
          platform.setName( getString(map, TestLinkResponseParams.name.toString()) );
          platform.setNotes( getString(map, TestLinkResponseParams.notes.toString()) );
        }
       
      }     
    }
    return platform;
View Full Code Here


            Object response = this.executeXmlRpcCall(TestLinkMethods.GET_TEST_PLAN_PLATFORMS.toString(), executionData);
            Object[] responseArray = (Object[]) response;
            platforms = new Platform[responseArray.length];
            for (int i = 0; i < responseArray.length; i++) {
                Map<String, Object> projectMap = (Map<String, Object>) responseArray[i];
                Platform platform = Util.getPlatform(projectMap);
                platforms[i] = platform;
            }

        } catch (XmlRpcException xmlrpcex) {
            throw new TestLinkAPIException("Error retrieving platforms: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

    /**
     * @param map
     * @return Platform.
     */
    public static final Platform getPlatform(Map<String, Object> map) {
        Platform platform = 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) {
                    platform = new Platform();
                    platform.setId(id);

                    platform.setName(getString(map, TestLinkResponseParams.NAME.toString()));
                    platform.setNotes(getString(map, TestLinkResponseParams.NOTES.toString()));
                }

            }
        }
        return platform;
View Full Code Here

                    testCase.setParentId(getInteger(map, TestLinkResponseParams.PARENT_ID.toString()));
                    testCase.setOrder(getInteger(map, TestLinkResponseParams.ORDER.toString()));
                    testCase.setExecutionOrder(getInteger(map, TestLinkResponseParams.EXECUTION_ORDER.toString()));
                    testCase.setName(getString(map, TestLinkResponseParams.NAME.toString()));

                    Platform platform = null;
                    String platformName = getString(map, TestLinkResponseParams.PLATFORM_NAME.toString());
                    Integer platformId = getInteger(map, TestLinkResponseParams.PLATFORM_ID.toString());
                    if (platformName != null || platformId != null) { // sometimes TL may return only one or the other
                        platform = new Platform();
                        platform.setId(platformId);
                        platform.setName(platformName);
                    }
                    testCase.setPlatform(platform);

                    testCase.setFeatureId(getInteger(map, TestLinkResponseParams.FEATURE_ID.toString()));
View Full Code Here

   * @param map
   * @return Platform.
   */
  public static final Platform getPlatform(Map<String, Object> map)
  {
    Platform platform = 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 )
        {
          platform = new Platform();
          platform.setId( id );
         
          platform.setName( getString(map, TestLinkResponseParams.name.toString()) );
          platform.setNotes( getString(map, TestLinkResponseParams.notes.toString()) );
        }
       
      }     
    }
    return platform;
View Full Code Here

    /**
     * @param map
     * @return Platform.
     */
    public static final Platform getPlatform(Map<String, Object> map) {
        Platform platform = 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) {
                    platform = new Platform();
                    platform.setId(id);

                    platform.setName(getString(map, TestLinkResponseParams.NAME.toString()));
                    platform.setNotes(getString(map, TestLinkResponseParams.NOTES.toString()));
                }

            }
        }
        return platform;
View Full Code Here

                    if (testCaseName == null) {
                        testCaseName = getString(map, TestLinkResponseParams.NAME.toString());
                    }
                    testCase.setName(testCaseName);

                    Platform platform = null;
                    String platformName = getString(map, TestLinkResponseParams.PLATFORM_NAME.toString());
                    Integer platformId = getInteger(map, TestLinkResponseParams.PLATFORM_ID.toString());
                    if (platformName != null || platformId != null) { // sometimes TL may return only one or the other
                        platform = new Platform();
                        platform.setId(platformId);
                        platform.setName(platformName);
                    }
                    testCase.setPlatform(platform);

                    testCase.setFeatureId(getInteger(map, TestLinkResponseParams.FEATURE_ID.toString()));
View Full Code Here

      executionData.put(TestLinkParams.TEST_PROJECT_ID.toString(), testProjectId);
      Object response = this.executeXmlRpcCall(TestLinkMethods.GET_PROJECT_PLATFORMS.toString(), executionData);
      Map<String, Object> responseMap = Util.castToMap(response);
      if (responseMap.size() == 2 && responseMap.get("id") != null && responseMap.get("name") != null && responseMap.get("name") instanceof String) {
        platforms = new Platform[1];
        Platform platform = Util.getPlatform(responseMap);
        platforms[0] = platform;
      } else {
        platforms = new Platform[responseMap.size()];
        Collection<Object> list = responseMap.values();
        int index = 0;
        for (Object o : list) {
          Platform platform = Util.getPlatform((Map<String, Object>) o);
          platforms[index] = platform;
          index++;
        }
      }
      return platforms;
View Full Code Here

                    executionData);
            Object[] responseArray = (Object[]) response;
            platforms = new Platform[responseArray.length];
            for (int i = 0; i < responseArray.length; i++) {
                Map<String, Object> projectMap = (Map<String, Object>) responseArray[i];
                Platform platform = Util.getPlatform(projectMap);
                platforms[i] = platform;
            }

        } catch (XmlRpcException xmlrpcex) {
            throw new TestLinkAPIException("Error retrieving platforms: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

    /**
     * @param map
     * @return Platform.
     */
    public static final Platform getPlatform(Map<String, Object> map) {
  Platform platform = 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) {
        platform = new Platform();
        platform.setId(id);

        platform.setName(getString(map,
          TestLinkResponseParams.NAME.toString()));
        platform.setNotes(getString(map,
          TestLinkResponseParams.NOTES.toString()));
    }

      }
  }
View Full Code Here

TOP

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

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.