public final class Util extends Object
public static Map<String,Object> getTestProjectMap(TestProject project)
project
- test projectpublic static TestProject getTestProject(Map<String,Object> map)
map
- Map with properties of a Test Project.public static Boolean getBoolean(Map<String,Object> map, String key)
map
- a mapkey
- the desired keypublic static String getString(Map<String,Object> map, String key)
map
- a mapkey
- the desired keypublic static Integer getInteger(Map<String,Object> map, String key)
map
- a mapkey
- the desired keypublic static Map<String,Object> getTestPlanMap(TestPlan plan)
plan
- test planpublic static TestPlan getTestPlan(Map<String,Object> map)
map
- a mappublic static Platform getPlatform(Map<String,Object> map)
map
- a mappublic static Map<String,Object> getTestCaseMap(TestCase testCase)
testCase
- test casepublic static List<Map<String,Object>> getTestCaseStepsMap(List<TestCaseStep> testCaseSteps)
testCaseSteps
- test case stepspublic static List<Integer> getTestCaseStepsIdList(List<TestCaseStep> testCaseSteps)
testCaseSteps
- test case stepspublic static TestCaseStep getTestCaseStep(Map<String,Object> map)
map
- Case Step mappublic static Map<String,Object> getTestCaseStepMap(TestCaseStep testCaseStep)
testCaseStep
- test case steppublic static Map<String,Object> getTestCaseStepMap(TestCaseStep testCaseStep, boolean internal)
testCaseStep
- test case stepinternal
- the API uses different names for the the same parameter
in different methods.public static List<Map<String,Object>> getTestCaseStepResultMap(List<TestCaseStepResult> testCaseStepResults)
testCaseStepResults
- test case stepspublic static Map<String,Object> getTestSuiteMap(TestSuite testSuite)
testSuite
- test suitepublic static TestSuite getTestSuite(Map<String,Object> map)
map
- a mappublic static TestCase getTestCase(Map<String,Object> map)
map
- a mappublic static Object[] getArray(Map<String,Object> map, String key)
map
- a mapkey
- the desired keypublic static Object[] castToArray(Object object)
object
- an objectpublic static Map<String,Object> castToMap(Object object)
object
- an objectpublic static Map<String,Object> getBuildMap(Build build)
build
- a buildpublic static Map<String,Object> getAttachmentMap(Attachment attachment)
attachment
- an attachmentpublic static Map<String,Object> getTestCaseAttachmentMap(Attachment attachment)
attachment
- an attachmentpublic static Map<String,Object> getTestSuiteAttachmentMap(Attachment attachment)
attachment
- an attachmentpublic static Map<String,Object> getTestProjectAttachmentMap(Attachment attachment)
attachment
- an attachmentpublic static Map<String,Object> getRequirementAttachmentMap(Attachment attachment)
attachment
- an attachmentpublic static Map<String,Object> getRequirementSpecificationAttachmentMap(Attachment attachment)
attachment
- an attachmentpublic static Map<String,Object> getExecutionAttachmentMap(Attachment attachment)
attachment
- an attachmentpublic static Attachment getAttachment(Map<String,Object> map)
map
- a mappublic static List<Map<String,Object>> getRequirementsGroupedByReqSpecMap(List<Requirement> requirements)
requirements
- list of requirementspublic static Execution getExecution(Map<String,Object> map)
map
- a mappublic static Build getBuild(Map<String,Object> map)
map
- a mappublic static ReportTCResultResponse getReportTCResultResponse(Map<String,Object> map)
map
- a mappublic static CustomField getCustomField(Map<String,Object> map)
map
- a mappublic static void putIfNotNullAndTrue(Map<String,Object> map, String key, Boolean boolValue)
map
- Map.key
- Key.boolValue
- Boolean value.public static void putIfNotNull(Map<String,Object> map, String key, Object value)
map
- Map.key
- Key.value
- value.public static String getStringValueOrNull(Object o)
o
- objectnull
if object is null, otherwise value of the toString methodpublic static User getUser(Map<String,Object> map)
User
from a map with properties.map
- map with propertiesUser
Copyright © 2010–2020. All rights reserved.