public override UPnPTestStates Run(ICollection otherSubTests, CdsSubTestArgument arg) { this._TestState = UPnPTestStates.Running; CpContentDirectory CDS = this.GetCDS(arg._Device); _Details = new CdsResult_GetSearchCapabilities(); try { if (CDS != null) { DateTime start = System.DateTime.Now; CDS.Sync_GetSearchCapabilities(out _Details.SearchCapabilities); this.LogResponseTime(start, _Details, arg); } } catch (UPnPInvokeException ie) { arg.TestGroup.AddResult(this._Name + " test failed because of an invocation error: " + ie.Message); this._TestState = UPnPTestStates.Failed; return(this._TestState); } /* REMOVED BECAUSE EMPTY STRING IS LEGIT * if ((_Details.SearchCapabilities == null) || (_Details.SearchCapabilities == "")) * { * arg.TestGroup.AddResult(this._Name + " test failed because result was empty or null string."); * return UPnPTestStates.Failed; * } */ arg._TestGroupState.SearchCapabilities = _Details.SearchCapabilities; arg.TestGroup.AddResult(this._Name + " test passed. Returned=\"" + _Details.SearchCapabilities + "\"."); this._TestState = UPnPTestStates.Pass; return(this._TestState); }
public override UPnPTestStates Run(ICollection otherSubTests, CdsSubTestArgument arg) { this._TestState = UPnPTestStates.Running; CpContentDirectory CDS = this.GetCDS(arg._Device); _Details = new CdsResult_GetSearchCapabilities(); try { if (CDS != null) { DateTime start = System.DateTime.Now; CDS.Sync_GetSearchCapabilities(out _Details.SearchCapabilities); this.LogResponseTime(start, _Details, arg); } } catch (UPnPInvokeException ie) { arg.TestGroup.AddResult(this._Name + " test failed because of an invocation error: " + ie.Message); this._TestState = UPnPTestStates.Failed; return this._TestState; } /* REMOVED BECAUSE EMPTY STRING IS LEGIT if ((_Details.SearchCapabilities == null) || (_Details.SearchCapabilities == "")) { arg.TestGroup.AddResult(this._Name + " test failed because result was empty or null string."); return UPnPTestStates.Failed; } */ arg._TestGroupState.SearchCapabilities = _Details.SearchCapabilities; arg.TestGroup.AddResult(this._Name + " test passed. Returned=\"" + _Details.SearchCapabilities + "\"."); this._TestState = UPnPTestStates.Pass; return this._TestState; }