Integer testProjectId, String authorLogin, String summary,
List<TestCaseStep> steps, String preconditions,
TestImportance importance, ExecutionType execution, Integer order,
Integer internalId, Boolean checkDuplicatedName,
ActionOnDuplicate actionOnDuplicatedName) throws TestLinkAPIException {
TestCase testCase = null;
Integer id = null;
testCase = new TestCase(id, testCaseName, testSuiteId, testProjectId,
authorLogin, summary, steps, preconditions, importance,
execution, null, order, internalId, checkDuplicatedName,
actionOnDuplicatedName, null, null, null, null, null);
try {
Map<String, Object> executionData = Util.getTestCaseMap(testCase);
Object response = this.executeXmlRpcCall(
TestLinkMethods.CREATE_TEST_CASE.toString(), executionData);
Object[] responseArray = Util.castToArray(response);
Map<String, Object> responseMap = (Map<String, Object>) responseArray[0];
id = Util.getInteger(responseMap,
TestLinkResponseParams.ID.toString());
testCase.setId(id);
} catch (XmlRpcException xmlrpcex) {
throw new TestLinkAPIException("Error creating test plan: "
+ xmlrpcex.getMessage(), xmlrpcex);
}