public GeneralResult ReportTCResult(int testcaseid, int testplanid, TestCaseResultStatus status, int platformId = 0, string platformName = null, bool overwrite = false, bool guess = true, string notes = "", int buildid = 0, int bugid = 0)
{
stateIsValid();
string statusChar = "";
switch (status) {
case TestCaseResultStatus.Blocked:
statusChar = "b";
break;
case TestCaseResultStatus.Pass:
statusChar = "p";
break;
case TestCaseResultStatus.Fail:
statusChar = "f";
break;
}
object response = null;
if (platformName != null) {
if (bugid == 0) {
if (buildid == 0)
response = proxy.reportTCResult(devkey, testcaseid, testplanid, statusChar, platformName, overwrite, notes, guess);
else
response = proxy.reportTCResult(devkey, testcaseid, testplanid, statusChar, platformName, overwrite, notes, guess, 0, buildid);
} else {
if (buildid == 0)
response = proxy.reportTCResult(devkey, testcaseid, testplanid, statusChar, platformName, overwrite, notes, guess, bugid);
else
response = proxy.reportTCResult(devkey, testcaseid, testplanid, statusChar, platformName, overwrite, notes, guess, bugid, buildid);
}
} else {
if (platformId == 0)
throw new TestLinkException("must supply either a platform id or a platform name");
if (bugid == 0) {
if (buildid == 0)
response = proxy.reportTCResult(devkey, testcaseid, testplanid, statusChar, platformId, overwrite, notes, guess);
else
response = proxy.reportTCResult(devkey, testcaseid, testplanid, statusChar, platformId, overwrite, notes, guess, 0, buildid);
} else {
if (buildid == 0)
response = proxy.reportTCResult(devkey, testcaseid, testplanid, statusChar, platformId, overwrite, notes, guess, bugid);
else
response = proxy.reportTCResult(devkey, testcaseid, testplanid, statusChar, platformId, overwrite, notes, guess, bugid, buildid);
}
}
handleErrorMessage(response);
//object response = proxy.reportTCResult(devkey, testcaseid, testplanid, statusChar, platformId, overwrite, notes, guess, buildid, bugid);
//handleErrorMessage(response);
return handleReportTCResult(response);
}