Package br.eti.kinoshita.testlinkjavaapi.model

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


    String fileType,
    String content
  )
  throws TestLinkAPIException
  {
    Attachment attachment = null;
   
    Integer id = 0;
   
    attachment = new Attachment(
      id,
      testProjectId,
      TestLinkTables.nodesHierarchy.toString(),
      title,
      description,
      fileName,
      null,
      fileType,
      content
    );
   
    try
    {
      Map<String, Object> executionData = Util.getTestProjectAttachmentMap(attachment);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.uploadTestProjectAttachment.toString(), executionData);
      Map<String, Object> responseMap = (Map<String, Object>)response;
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      attachment.setId(id);
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error uploading attachment for test project: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here


    String fileType,
    String content
  )
  throws TestLinkAPIException
  {
    Attachment attachment = null;
   
    Integer id = 0;
   
    attachment = new Attachment(
      id,
      reqSpecId,
      TestLinkTables.reqSpecs.toString(),
      title,
      description,
      fileName,
      null,
      fileType,
      content
    );
   
    try
    {
      Map<String, Object> executionData = Util.getRequirementSpecificatoinAttachmentMap(attachment);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.uploadRequirementSpecificationAttachment.toString(), executionData);
      Map<String, Object> responseMap = (Map<String, Object>)response;
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      attachment.setId(id);
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error uploading attachment for requirement specification: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

    String fileName,
    String fileType,
    String content )
  throws TestLinkAPIException
  {
    Attachment attachment = null;
   
    Integer id = 0;
   
    attachment = new Attachment(
      id,
      testSuiteId,
      TestLinkTables.nodesHierarchy.toString(),
      title,
      description,
      fileName,
      null,
      fileType,
      content
    );
   
    try
    {
      Map<String, Object> executionData = Util.getTestSuiteAttachmentMap(attachment);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.uploadTestSuiteAttachment.toString(), executionData);
      Map<String, Object> responseMap = (Map<String, Object>)response;
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      attachment.setId(id);
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error uploading attachment for test suite: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

    String fileType,
    String content
  )
  throws TestLinkAPIException
  {
    Attachment attachment = null;
   
    Integer id = 0;
   
    attachment = new Attachment(
      id,
      fkId,
      fkTable,
      title,
      description,
      fileName,
      null,
      fileType,
      content
    );
   
    try
    {
      Map<String, Object> executionData = Util.getAttachmentMap(attachment);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.uploadAttachment.toString(), executionData);
      Map<String, Object> responseMap = (Map<String, Object>)response;
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      attachment.setId(id);
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error uploading attachment: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

    String fileType,
    String content
  )
  throws TestLinkAPIException
  {
    Attachment attachment = null;
   
    Integer id = 0;
   
    attachment = new Attachment(
      id,
      requirementId,
      TestLinkTables.requirements.toString(),
      title,
      description,
      fileName,
      null,
      fileType,
      content
    );
   
    try
    {
      Map<String, Object> executionData = Util.getRequirementAttachmentMap(attachment);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.uploadRequirementAttachment.toString(), executionData);
      Map<String, Object> responseMap = (Map<String, Object>)response;
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      attachment.setId(id);
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error uploading attachment for requirement: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

    String fileType,
    String content
  )
  throws TestLinkAPIException
  {
    Attachment attachment = null;
   
    Integer id = 0;
   
    attachment = new Attachment(
      id,
      testCaseId,
      TestLinkTables.nodesHierarchy.toString(),
      title,
      description,
      fileName,
      null,
      fileType,
      content
    );
   
    try
    {
      Map<String, Object> executionData = Util.getTestCaseAttachmentMap(attachment);
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.uploadTestCaseAttachment.toString(), executionData);
      Map<String, Object> responseMap = (Map<String, Object>)response;
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      attachment.setId(id);
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error uploading attachment for test case: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

      String fileType,
      String content
  )
  throws TestLinkAPIException
  {
    Attachment attachment = null;
   
    Integer id = 0;
   
    attachment = new Attachment(
      id,
      executionId,
      TestLinkTables.executions.toString(),
      title,
      description,
      fileName,
      null,
      fileType,
      content
    );
   
   
    try
    {
      Map<String, Object> executionData = Util.getExecutionAttachmentMap(attachment);
     
      Object response = this.executeXmlRpcCall(
          TestLinkMethods.uploadExecutionAttachment.toString(), executionData);
      Map<String, Object> responseMap = (Map<String, Object>)response;
      id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
      attachment.setId(id);
    }
    catch ( XmlRpcException xmlrpcex )
    {
      throw new TestLinkAPIException(
          "Error uploading attachment for execution: " + xmlrpcex.getMessage(), xmlrpcex);
View Full Code Here

TOP

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

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.