public void MSOXNSPI_S05_TC35_GetMatchesFailedWithGeneralFailure()
{
this.CheckProductSupported();
this.CheckMAPIHTTPTransportSupported();
#region Call NspiBind to initiate a session between the client and the server.
uint flags = 0;
STAT stat = new STAT();
stat.InitiateStat();
FlatUID_r guid = new FlatUID_r
{
Ab = new byte[16]
};
FlatUID_r? serverGuid = guid;
this.Result = this.ProtocolAdatper.NspiBind(flags, stat, ref serverGuid);
Site.Assert.AreEqual<ErrorCodeValue>(ErrorCodeValue.Success, this.Result, "NspiBind should return Success!");
#endregion
#region Call NspiGetMatches with the Filter field set to null and the STAT block specifies an invalid position.
uint reserved1 = 0;
uint reserver2 = 0;
uint requested = Constants.GetMatchesRequestedRowNumber;
PropertyName_r? propNameOfGetMatches = null;
PropertyTagArray_r? proReserved = null;
Restriction_r? filter = null;
PropertyTagArray_r propTags = new PropertyTagArray_r
{
CValues = 1,
AulPropTag = new uint[1]
{
(uint)AulProp.PidTagEntryId,
}
};
PropertyTagArray_r? propTagsOfGetMatches = propTags;
PropertyTagArray_r? outMIds;
PropertyRowSet_r? rowsOfGetMatches;
this.Result = this.ProtocolAdatper.NspiGetMatches(reserved1, ref stat, proReserved, reserver2, filter, propNameOfGetMatches, requested, out outMIds, propTagsOfGetMatches, out rowsOfGetMatches, false);
#region Capture
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXNSPI_R1138");
// Verify MS-OXNSPI requirement: MS-OXNSPI_R1138
Site.CaptureRequirementIfAreEqual<ErrorCodeValue>(
ErrorCodeValue.GeneralFailure,
this.Result,
1138,
@"[In NspiGetMatches] [Server Processing Rules: Upon receiving message NspiGetMatches, the server MUST process the data from the message subject to the following constraints:] [Constraint 10] If the server is unable to locate the object, the server MUST return the value ""GeneralFailure"".");
#endregion
#endregion
#region Call NspiUnbind to destroy the session between the client and the server.
uint returnValue = this.ProtocolAdatper.NspiUnbind(0);
Site.Assert.AreEqual<uint>(1, returnValue, "NspiUnbind method should return 1 (Success).");
#endregion
}