* @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 )
// {