* @return Created Test Project object.
*/
public TestProject createTestProject(String testProjectName,
String testProjectPrefix, String notes)
throws TestLinkAPIException {
TestProject testProject = null;
Integer id = 0;
testProject = new TestProject(id, testProjectName, notes, testProjectPrefix);
try {
Map<String, Object> executionData = getTestProjectMap(testProject);
Object response = this.executeXmlRpcCall(
Methods.CREATE_TEST_PROJECT.toString(), executionData);
Object[] responseArray = TestLinkHelper.castToArray(response);
Map<String, Object> responseMap = (Map<String, Object>) responseArray[0];
id = TestLinkHelper.getInteger(responseMap, Params.ID.toString());
testProject.setId(id);
} catch (XmlRpcException xmlrpcex) {
throw new TestLinkAPIException("Error creating test project: "
+ xmlrpcex.getMessage(), xmlrpcex);
}