Integer order,
Boolean checkDuplicatedName,
String actionOnDuplicatedName )
throws TestLinkAPIException
{
TestSuite testSuite = null;
Integer id = 0;
testSuite = new TestSuite(
id,
testProjectId,
name,
details,
parentId,
order,
checkDuplicatedName,
actionOnDuplicatedName
);
try
{
Map<String, Object> executionData = Util.getTestSuiteMap(testSuite);
Object response = this.executeXmlRpcCall(
TestLinkMethods.createTestSuite.toString(), executionData);
Object[] responseArray = Util.castToArray(response);
Map<String, Object> responseMap = (Map<String, Object>)responseArray[0];
id = Util.getInteger(responseMap, TestLinkResponseParams.id.toString());
testSuite.setId( id );
}
catch ( XmlRpcException xmlrpcex )
{
throw new TestLinkAPIException(
"Error creating test suite: " + xmlrpcex.getMessage(), xmlrpcex);