/// <summary> /// This method is used by the client to map a set of distinguished names to a set of Minimal Entry IDs. /// </summary> /// <param name="distinguishedNameToMIdRequestBody">The DnToMinId request type request body.</param> /// <returns>The response body of the DnToMinId request type.</returns> public DnToMinIdResponseBody DnToMinId(DNToMinIdRequestBody distinguishedNameToMIdRequestBody) { CommonResponse commonResponse = this.SendAddressBookRequest(distinguishedNameToMIdRequestBody, RequestType.DNToMId); DnToMinIdResponseBody distinguishedNameToMinIdResponseBody = DnToMinIdResponseBody.Parse(commonResponse.ResponseBodyRawData); this.VerifyDnToMinIdResponseBody(distinguishedNameToMinIdResponseBody); return(distinguishedNameToMinIdResponseBody); }
/// <summary> /// Build the DNToMinId request body. /// </summary> /// <param name="hasNames">A Boolean value that specifies whether the Names field is present.</param> /// <param name="names">A StringsArray_r structure that contains the list of distinguished names (DNs) (1) to be mapped to Minimal Entry IDs.</param> /// <returns>The DNToMinId request body.</returns> private DNToMinIdRequestBody BuildDNToMinIdRequestBody(bool hasNames, StringArray_r names) { DNToMinIdRequestBody requestBodyOfDNToMId = new DNToMinIdRequestBody(); requestBodyOfDNToMId.Reserved = 0x0; requestBodyOfDNToMId.HasNames = hasNames; if (hasNames) { requestBodyOfDNToMId.Names = names; } byte[] auxIn = new byte[] { }; requestBodyOfDNToMId.AuxiliaryBuffer = auxIn; requestBodyOfDNToMId.AuxiliaryBufferSize = (uint)auxIn.Length; return requestBodyOfDNToMId; }
public void MSOXCMAPIHTTP_S02_TC05_CompareMinIds() { this.CheckMapiHttpIsSupported(); #region Call Bind request type to established a session context with the address book server. this.Bind(); #endregion #region Call DnToMinId request type to map a set of DNs to a set of Minimal Entry IDs. // Reserved. The client MUST set this field to 0x00000000 and the server MUST ignore this field. uint reserved = 0; byte[] auxIn = new byte[] { }; DNToMinIdRequestBody requestBodyOfDNToMId = new DNToMinIdRequestBody() { Reserved = reserved, HasNames = true, Names = new StringArray_r { CValues = 2, LppzA = new string[] { this.AdminUserDN, Common.GetConfigurationPropertyValue("GeneralUserEssdn", this.Site) } }, AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; DnToMinIdResponseBody responseBodyOfDNToMinId = this.Adapter.DnToMinId(requestBodyOfDNToMId); Site.Assert.AreEqual<uint>(0, responseBodyOfDNToMinId.ErrorCode, "DnToMinId should succeed and 0 is expected to be returned. The returned value is {0}.", responseBodyOfDNToMinId.ErrorCode); #endregion #region Call CompareMinIds to compare the positions of two objects in an address book container. STAT stat = new STAT(); stat.InitiateStat(); CompareMinIdsRequestBody compareMinIdsRequestBody = new CompareMinIdsRequestBody() { // Reserved. The client MUST set this field to 0x00000000 and the server MUST ignore this field. Reserved = 0, HasState = true, State = stat, MinimalId1 = responseBodyOfDNToMinId.MinimalIds[0], MinimalId2 = responseBodyOfDNToMinId.MinimalIds[1], AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; CompareMinIdsResponseBody compareMinIdsResponseBody = this.Adapter.CompareMinIds(compareMinIdsRequestBody); Site.Assert.AreEqual<uint>(0, compareMinIdsResponseBody.ErrorCode, "CompareMinIds should succeed and 0 is expected to be returned. The returned value is {0}.", compareMinIdsResponseBody.ErrorCode); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R372"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R372 // If the position of the object specified by MId1 comes before the position of the object specified by MId2 in the table, the server MUST return a value less than 0; // If the position of the object specified by MId1 comes after the position of the object specified by MId2 in the table, the server MUST return a value greater than 0; // If the position of the object specified by MId1 is the same as the position of the object specified by MId2 in the table, the server MUST return a value of 0. // So if the value type of result is integer, R372 is verified. this.Site.CaptureRequirementIfIsInstanceOfType( compareMinIdsResponseBody.Result, typeof(int), 372, @"[In CompareMinIds Request Type] The CompareMinIds request type is used by the client to compare the positions of two objects in an address book container."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R2111"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R2111 this.Site.CaptureRequirementIfIsTrue( compareMinIdsResponseBody.Result < 0, 2111, @"[In CompareMinIds Request Type Success Response Body] [Result] A value less than 0 (zero): The position of the object specified by the MinimalId1 field of the request body precedes the position of the object specified by the MinimalId2 field."); compareMinIdsRequestBody = new CompareMinIdsRequestBody() { // Reserved. The client MUST set this field to 0x00000000 and the server MUST ignore this field. Reserved = 0, HasState = true, State = stat, MinimalId1 = responseBodyOfDNToMinId.MinimalIds[1], MinimalId2 = responseBodyOfDNToMinId.MinimalIds[0], AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; compareMinIdsResponseBody = this.Adapter.CompareMinIds(compareMinIdsRequestBody); Site.Assert.AreEqual<uint>(0, compareMinIdsResponseBody.ErrorCode, "CompareMinIds should succeed and 0 is expected to be returned. The returned value is {0}.", compareMinIdsResponseBody.ErrorCode); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R2112"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R2112 this.Site.CaptureRequirementIfIsTrue( compareMinIdsResponseBody.Result > 0, 2112, @"[In CompareMinIds Request Type Success Response Body] [Result] A value greater than 0 (zero): The position of the object specified by the MinimalId1 field of the request body succeeds the position of the object specified by the MinimalId2 field."); compareMinIdsRequestBody = new CompareMinIdsRequestBody() { // Reserved. The client MUST set this field to 0x00000000 and the server MUST ignore this field. Reserved = 0, HasState = true, State = stat, MinimalId1 = responseBodyOfDNToMinId.MinimalIds[0], MinimalId2 = responseBodyOfDNToMinId.MinimalIds[0], AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; compareMinIdsResponseBody = this.Adapter.CompareMinIds(compareMinIdsRequestBody); Site.Assert.AreEqual<uint>(0, compareMinIdsResponseBody.ErrorCode, "CompareMinIds should succeed and 0 is expected to be returned. The returned value is {0}.", compareMinIdsResponseBody.ErrorCode); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R2109"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R2109 this.Site.CaptureRequirementIfIsTrue( compareMinIdsResponseBody.Result == 0, 2109, @"[In CompareMinIds Request Type Success Response Body] [Result] Value 0 (zero): The position of the object specified by the MinimalId1 field of the request body is the same as the position of the object specified by the MinimalId2 field. "); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R2110"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R2110 this.Site.CaptureRequirementIfAreEqual<uint>( compareMinIdsRequestBody.MinimalId1, compareMinIdsRequestBody.MinimalId2, 2110, @"[In CompareMinIds Request Type Success Response Body] [Result] Value 0 (zero): That is, the two fields specify the same object."); #endregion #region Call CompareMinIds request body with HasState set to false to compare the positions of two objects in an address book container. compareMinIdsRequestBody = new CompareMinIdsRequestBody() { // Reserved. The client MUST set this field to 0x00000000 and the server MUST ignore this field. Reserved = 0, HasState = false, MinimalId1 = responseBodyOfDNToMinId.MinimalIds[0], MinimalId2 = responseBodyOfDNToMinId.MinimalIds[1], AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; compareMinIdsResponseBody = this.Adapter.CompareMinIds(compareMinIdsRequestBody); Site.Assert.AreEqual<uint>(0, compareMinIdsResponseBody.StatusCode, "CompareMinIds should succeed and 0 is expected to be returned. The returned value is {0}.", compareMinIdsResponseBody.StatusCode); #endregion #region Call the Unbind request type to destroy the session context. this.Unbind(); #endregion }
public void MSOXCMAPIHTTP_S02_TC21_TestHasValueWithPropertyTypePtypMultipleString() { this.CheckMapiHttpIsSupported(); byte[] auxIn = new byte[] { }; #region Call Bind request type to established a session context with the address book server. this.Bind(); #endregion #region Call QueryRows request type to get a set of valid rows used to matched entry ID as the input paramter of ModLinkAtt method. STAT stat = new STAT(); stat.InitiateStat(); uint tableCount = 0; uint[] table = null; LargePropertyTagArray largePropTagArray = new LargePropertyTagArray() { PropertyTagCount = 4, PropertyTags = new PropertyTag[] { new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypString, PropertyId = (ushort)PropertyID.PidTagDisplayName }, new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypBinary, PropertyId = (ushort)PropertyID.PidTagEntryId }, new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypInteger32, PropertyId = (ushort)PropertyID.PidTagDisplayType }, new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypMultipleString, PropertyId = (ushort)PropertyID.PidTagAddressBookMember } } }; QueryRowsRequestBody queryRowsRequestBody = new QueryRowsRequestBody(); queryRowsRequestBody.Flags = (uint)RetrievePropertyFlags.fSkipObjects; queryRowsRequestBody.HasState = true; queryRowsRequestBody.State = stat; queryRowsRequestBody.ExplicitTableCount = tableCount; queryRowsRequestBody.ExplicitTable = table; queryRowsRequestBody.RowCount = ConstValues.QueryRowsRequestedRowNumber; queryRowsRequestBody.HasColumns = true; queryRowsRequestBody.Columns = largePropTagArray; queryRowsRequestBody.AuxiliaryBuffer = auxIn; queryRowsRequestBody.AuxiliaryBufferSize = (uint)auxIn.Length; QueryRowsResponseBody queryRowsResponseBody = this.Adapter.QueryRows(queryRowsRequestBody); Site.Assert.AreEqual<uint>(0, queryRowsResponseBody.ErrorCode, "QueryRows request should be executed successfully, the returned value {0}.", queryRowsResponseBody.ErrorCode); #endregion #region Call ModLinkAtt with flags 0x00000000 to add the specified PidTagAddressBookMember value. uint flagsOfModLinkAtt = 0; PropertyTag propTagOfModLinkAtt = new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypEmbeddedTable, PropertyId = (ushort)PropertyID.PidTagAddressBookMember }; uint midOfModLinkAtt = 0; byte[] entryId = null; GetPropsRequestBody getPropsRequestBodyForAddressBookMember = null; uint lengthOfErrorCodeValue = sizeof(uint); string dlistName = Common.GetConfigurationPropertyValue("DistributionListName", this.Site); string memberName = Common.GetConfigurationPropertyValue("GeneralUserName", this.Site); for (int i = 0; i < queryRowsResponseBody.RowCount; i++) { string name = System.Text.Encoding.Unicode.GetString(queryRowsResponseBody.RowData[i].ValueArray[0].Value); if (name.ToLower().Contains(dlistName.ToLower())) { PermanentEntryID entryID = AdapterHelper.ParsePermanentEntryIDFromBytes(queryRowsResponseBody.RowData[i].ValueArray[1].Value); DNToMinIdRequestBody requestBodyOfDNToMId = new DNToMinIdRequestBody() { Reserved = 0, HasNames = true, Names = new StringArray_r { CValues = 1, LppzA = new string[] { entryID.DistinguishedName } }, AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; DnToMinIdResponseBody responseBodyOfDNToMinId = this.Adapter.DnToMinId(requestBodyOfDNToMId); midOfModLinkAtt = responseBodyOfDNToMinId.MinimalIds[0]; stat.CurrentRec = midOfModLinkAtt; STAT? statForGetProps = stat; LargePropertyTagArray propertyTagForGetProps = new LargePropertyTagArray() { PropertyTagCount = 2, PropertyTags = new PropertyTag[] { new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypInteger32, PropertyId = (ushort)PropertyID.PidTagDisplayType }, new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypMultipleString, PropertyId = (ushort)PropertyID.PidTagAddressBookMember }, } }; getPropsRequestBodyForAddressBookMember = this.BuildGetPropsRequestBody((uint)0, true, statForGetProps, true, propertyTagForGetProps); GetPropsResponseBody getPropsResponseBody = this.Adapter.GetProps(getPropsRequestBodyForAddressBookMember); this.Site.Assert.AreEqual<uint>(0, getPropsResponseBody.StatusCode, "The GetProps request should be executed successfully, the returned status code is {0}", getPropsResponseBody.StatusCode); this.Site.Assert.AreEqual<uint>(lengthOfErrorCodeValue, (uint)getPropsResponseBody.PropertyValues.Value.PropertyValues[1].Value.Length, "The length of the property value should be equal the ErrorCodeValue: Not Found(0x8004010F)"); uint propertyValue = BitConverter.ToUInt32(getPropsResponseBody.PropertyValues.Value.PropertyValues[1].Value, 0); this.Site.Assert.AreEqual<uint>((uint)ErrorCodeValue.NotFound, propertyValue, "The property value of AddressBookMember should be Not Found(0x8004010F), actual value is {0}", propertyValue); } else if (name.ToLower().Contains(memberName.ToLower())) { entryId = queryRowsResponseBody.RowData[i].ValueArray[1].Value; } if (midOfModLinkAtt != 0 && entryId != null) { break; } } ModLinkAttRequestBody modLinkAttRequestBody = new ModLinkAttRequestBody(); modLinkAttRequestBody.Flags = flagsOfModLinkAtt; modLinkAttRequestBody.PropertyTag = propTagOfModLinkAtt; modLinkAttRequestBody.MinimalId = midOfModLinkAtt; modLinkAttRequestBody.HasEntryIds = true; modLinkAttRequestBody.EntryIdCount = 1; modLinkAttRequestBody.EntryIDs = new byte[][] { entryId }; modLinkAttRequestBody.AuxiliaryBuffer = auxIn; modLinkAttRequestBody.AuxiliaryBufferSize = (uint)auxIn.Length; this.minimalIDForDeleteAddressBookMember = midOfModLinkAtt; this.entryIDBufferForDeleteAddressBookMember = entryId; this.isAddressBookMemberDeleted = false; ModLinkAttResponseBody modLinkAttResponseBodyOfAdd = this.Adapter.ModLinkAtt(modLinkAttRequestBody); GetPropsResponseBody getPropsResponseBodyForAddAddressBookMember = this.Adapter.GetProps(getPropsRequestBodyForAddressBookMember); uint modifyDisplayType = BitConverter.ToUInt32(getPropsResponseBodyForAddAddressBookMember.PropertyValues.Value.PropertyValues[0].Value, 0); int propertyValuelength = getPropsResponseBodyForAddAddressBookMember.PropertyValues.Value.PropertyValues[1].Value.Length; if (getPropsResponseBodyForAddAddressBookMember.PropertyValues.Value.PropertyValues[1].PropertyType == 0x101F) { // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R2257"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R2257 this.Site.CaptureRequirementIfIsInstanceOfType( getPropsResponseBodyForAddAddressBookMember.PropertyValues.Value.PropertyValues[1].HasValue, typeof(byte), 2257, @"[In AddressBookPropertyValue Structure] HasValue (optional) (1 byte): An unsigned integer when the PropertyType ([MS-OXCDATA] section 2.11.1) is known to be PtypMultipleString ([MS-OXCDATA] section 2.11.1)."); } #endregion #region Call ModLinkAtt to delete the specified PidTagAddressBookMember value. modLinkAttRequestBody.Flags = 1; ModLinkAttResponseBody modLinkAttResponseBodyOfDelete = this.Adapter.ModLinkAtt(modLinkAttRequestBody); Site.Assert.AreEqual<uint>(0, modLinkAttResponseBodyOfDelete.ErrorCode, "ModLinkAtt request should be executed successfully, the returned error code is {0}.", modLinkAttResponseBodyOfDelete.ErrorCode); this.isAddressBookMemberDeleted = true; #endregion #region Call Unbind request to destroy the session between the client and the server. this.Unbind(); #endregion }
public void MSOXCMAPIHTTP_S02_TC04_DnToMinId() { this.CheckMapiHttpIsSupported(); #region Call Bind request type to established a session context with the address book server. this.Bind(); #endregion #region Call DnToMinId request type to map a set of DNs to a set of Minimal Entry IDs. // Reserved. The client MUST set this field to 0x00000000 and the server MUST ignore this field. uint reserved = 0; byte[] auxIn = new byte[] { }; DNToMinIdRequestBody requestBodyOfDNToMId = new DNToMinIdRequestBody() { Reserved = reserved, HasNames = true, Names = new StringArray_r { CValues = 1, LppzA = new string[] { this.AdminUserDN } }, AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; DnToMinIdResponseBody responseBodyOfDNToMinId = this.Adapter.DnToMinId(requestBodyOfDNToMId); Site.Assert.AreEqual<uint>(0, responseBodyOfDNToMinId.ErrorCode, "DnToMinId should succeed and 0 is expected to be returned. The returned value is {0}.", responseBodyOfDNToMinId.ErrorCode); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R405"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R405 // The client defines a set of DNs, if there is MinimalIds, it indicates that the client maps a set of DNs (1) to a set of Minimal Entry IDs successfully. this.Site.CaptureRequirementIfIsNotNull( responseBodyOfDNToMinId.MinimalIds, 405, @"[In DnToMinId Request Type] The DnToMinId request type is used by the client to map a set of DNs (1) to a set of Minimal Entry IDs."); // Add the debug information this.Site.Log.Add( LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R436, the value of MinimalIdCount is {0}, the value of MinimalIds is {1}.", responseBodyOfDNToMinId.MinimalIdCount, responseBodyOfDNToMinId.MinimalIds); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R436 this.Site.CaptureRequirementIfIsTrue( responseBodyOfDNToMinId.MinimalIdCount == requestBodyOfDNToMId.Names.CValues && responseBodyOfDNToMinId.MinimalIds != null, 436, @"[In DnToMinId Request Type Success Response Body] MinimalIds (optional) (variable): An array of MinimalEntryID structures ([MS-OXNSPI] section 2.3.8.1), each of which specifies a Minimal Entry ID that matches a requested distinguished name (DN) (1)."); #endregion #region Call DnToMinId request body with HasNames set to false. requestBodyOfDNToMId = new DNToMinIdRequestBody() { Reserved = reserved, HasNames = false, AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; responseBodyOfDNToMinId = this.Adapter.DnToMinId(requestBodyOfDNToMId); Site.Assert.AreEqual<uint>(0, responseBodyOfDNToMinId.ErrorCode, "DnToMinId should succeed and 0 is expected to be returned. The returned value is {0}.", responseBodyOfDNToMinId.ErrorCode); #endregion #region Call the Unbind request type to destroy the session context. this.Unbind(); #endregion }
public void MSOXCMAPIHTTP_S02_TC18_ModLinkAttRequestType() { this.CheckMapiHttpIsSupported(); byte[] auxIn = new byte[] { }; #region Call Bind request type to established a session context with the address book server. this.Bind(); #endregion #region Call QueryRows request type to get a set of valid rows used to matched entry ID as the input paramter of ModLinkAtt method. STAT stat = new STAT(); stat.InitiateStat(); uint tableCount = 0; uint[] table = null; LargePropertyTagArray largePropTagArray = new LargePropertyTagArray() { PropertyTagCount = 4, PropertyTags = new PropertyTag[] { new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypString, PropertyId = (ushort)PropertyID.PidTagDisplayName }, new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypBinary, PropertyId = (ushort)PropertyID.PidTagEntryId }, new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypInteger32, PropertyId = (ushort)PropertyID.PidTagDisplayType }, new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypMultipleString8, PropertyId = (ushort)PropertyID.PidTagAddressBookMember } } }; QueryRowsRequestBody queryRowsRequestBody = new QueryRowsRequestBody(); queryRowsRequestBody.Flags = (uint)RetrievePropertyFlags.fSkipObjects; queryRowsRequestBody.HasState = true; queryRowsRequestBody.State = stat; queryRowsRequestBody.ExplicitTableCount = tableCount; queryRowsRequestBody.ExplicitTable = table; queryRowsRequestBody.RowCount = ConstValues.QueryRowsRequestedRowNumber; queryRowsRequestBody.HasColumns = true; queryRowsRequestBody.Columns = largePropTagArray; queryRowsRequestBody.AuxiliaryBuffer = auxIn; queryRowsRequestBody.AuxiliaryBufferSize = (uint)auxIn.Length; QueryRowsResponseBody queryRowsResponseBody = this.Adapter.QueryRows(queryRowsRequestBody); Site.Assert.AreEqual<uint>(0, queryRowsResponseBody.ErrorCode, "QueryRows request should be executed successfully, the returned value {0}.", queryRowsResponseBody.ErrorCode); #endregion #region Capture code AddressBookPropertyRow[] rowData = queryRowsResponseBody.RowData; for (int i = 0; i < rowData.Length; i++) { List<AddressBookPropertyValue> valueArray = new List<AddressBookPropertyValue>(rowData[i].ValueArray); for (int j = 0; j < valueArray.Count; j++) { if (largePropTagArray.PropertyTags[j].PropertyType == 0x001F) { // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R2001"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R2001 this.Site.CaptureRequirementIfIsInstanceOfType( valueArray[j].HasValue, typeof(byte), 2001, @"[In AddressBookPropertyValue Structure] HasValue (optional) (1 byte): An unsigned integer when the PropertyType ([MS-OXCDATA] section 2.11.1) is known to be PtypString."); } if (largePropTagArray.PropertyTags[j].PropertyType == 0x0102) { // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R2003"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R2003 this.Site.CaptureRequirementIfIsInstanceOfType( valueArray[j].HasValue, typeof(byte), 2003, @"[In AddressBookPropertyValue Structure] HasValue (optional) (1 byte): An unsigned integer when the PropertyType ([MS-OXCDATA] section 2.11.1) is known to be PtypBinary."); } } } #endregion #region Call ModLinkAtt with flags 0x00000000 to add the specified PidTagAddressBookMember value. uint flagsOfModLinkAtt = 0; PropertyTag propTagOfModLinkAtt = new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypEmbeddedTable, PropertyId = (ushort)PropertyID.PidTagAddressBookMember }; uint midOfModLinkAtt = 0; byte[] entryId = null; GetPropsRequestBody getPropsRequestBodyForAddressBookMember = null; uint lengthOfErrorCodeValue = sizeof(uint); string dlistName = Common.GetConfigurationPropertyValue("DistributionListName", this.Site); string memberName = Common.GetConfigurationPropertyValue("GeneralUserName", this.Site); for (int i = 0; i < queryRowsResponseBody.RowCount; i++) { string name = System.Text.Encoding.Unicode.GetString(queryRowsResponseBody.RowData[i].ValueArray[0].Value); if (name.ToLower().Contains(dlistName.ToLower())) { PermanentEntryID entryID = AdapterHelper.ParsePermanentEntryIDFromBytes(queryRowsResponseBody.RowData[i].ValueArray[1].Value); DNToMinIdRequestBody requestBodyOfDNToMId = new DNToMinIdRequestBody() { Reserved = 0, HasNames = true, Names = new StringArray_r { CValues = 1, LppzA = new string[] { entryID.DistinguishedName } }, AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; DnToMinIdResponseBody responseBodyOfDNToMinId = this.Adapter.DnToMinId(requestBodyOfDNToMId); midOfModLinkAtt = responseBodyOfDNToMinId.MinimalIds[0]; stat.CurrentRec = midOfModLinkAtt; STAT? statForGetProps = stat; LargePropertyTagArray propertyTagForGetProps = new LargePropertyTagArray() { PropertyTagCount = 2, PropertyTags = new PropertyTag[] { new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypInteger32, PropertyId = (ushort)PropertyID.PidTagDisplayType }, new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypMultipleString8, PropertyId = (ushort)PropertyID.PidTagAddressBookMember }, } }; getPropsRequestBodyForAddressBookMember = this.BuildGetPropsRequestBody((uint)0, true, statForGetProps, true, propertyTagForGetProps); GetPropsResponseBody getPropsResponseBody = this.Adapter.GetProps(getPropsRequestBodyForAddressBookMember); this.Site.Assert.AreEqual<uint>(0, getPropsResponseBody.StatusCode, "The GetProps request should be executed successfully, the returned status code is {0}", getPropsResponseBody.StatusCode); this.Site.Assert.AreEqual<uint>(lengthOfErrorCodeValue, (uint)getPropsResponseBody.PropertyValues.Value.PropertyValues[1].Value.Length, "The length of the property value should be equal the ErrorCodeValue: Not Found(0x8004010F)"); uint propertyValue = BitConverter.ToUInt32(getPropsResponseBody.PropertyValues.Value.PropertyValues[1].Value, 0); this.Site.Assert.AreEqual<uint>((uint)ErrorCodeValue.NotFound, propertyValue, "The property value of AddressBookMember should be Not Found(0x8004010F), actual value is {0}", propertyValue); } else if (name.ToLower().Contains(memberName.ToLower())) { entryId = queryRowsResponseBody.RowData[i].ValueArray[1].Value; } if (midOfModLinkAtt != 0 && entryId != null) { break; } } ModLinkAttRequestBody modLinkAttRequestBody = new ModLinkAttRequestBody(); modLinkAttRequestBody.Flags = flagsOfModLinkAtt; modLinkAttRequestBody.PropertyTag = propTagOfModLinkAtt; modLinkAttRequestBody.MinimalId = midOfModLinkAtt; modLinkAttRequestBody.HasEntryIds = true; modLinkAttRequestBody.EntryIdCount = 1; modLinkAttRequestBody.EntryIDs = new byte[][] { entryId }; modLinkAttRequestBody.AuxiliaryBuffer = auxIn; modLinkAttRequestBody.AuxiliaryBufferSize = (uint)auxIn.Length; this.minimalIDForDeleteAddressBookMember = midOfModLinkAtt; this.entryIDBufferForDeleteAddressBookMember = entryId; this.isAddressBookMemberDeleted = false; ModLinkAttResponseBody modLinkAttResponseBodyOfAdd = this.Adapter.ModLinkAtt(modLinkAttRequestBody); GetPropsResponseBody getPropsResponseBodyForAddAddressBookMember = this.Adapter.GetProps(getPropsRequestBodyForAddressBookMember); uint modifyDisplayType = BitConverter.ToUInt32(getPropsResponseBodyForAddAddressBookMember.PropertyValues.Value.PropertyValues[0].Value, 0); int propertyValuelength = getPropsResponseBodyForAddAddressBookMember.PropertyValues.Value.PropertyValues[1].Value.Length; if (getPropsResponseBodyForAddAddressBookMember.PropertyValues.Value.PropertyValues[1].PropertyType == 0x101E) { // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R2258"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R2258 this.Site.CaptureRequirementIfIsInstanceOfType( getPropsResponseBodyForAddAddressBookMember.PropertyValues.Value.PropertyValues[1].HasValue, typeof(byte), 2258, @"[In AddressBookPropertyValue Structure] HasValue (optional) (1 byte): An unsigned integer when the PropertyType ([MS-OXCDATA] section 2.11.1) is known to be PtypMultipleString8 ([MS-OXCDATA] section 2.11.1)."); } // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R724"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R724 this.Site.CaptureRequirementIfAreEqual<uint>( 0, modLinkAttResponseBodyOfAdd.ErrorCode, 724, @"[In ModLinkAtt Request Type] The ModLinkAtt request type is used by the client to modify a specific property of a row in the address book."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R1333, the DisplayTypeValues should be {0}, the length of the property value was changed from {1} to {2}.", DisplayTypeValues.DT_DISTLIST.ToString(), lengthOfErrorCodeValue, propertyValuelength); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1333 bool isVerifiedR1333 = (modifyDisplayType == (uint)DisplayTypeValues.DT_DISTLIST) && (propertyValuelength != lengthOfErrorCodeValue); this.Site.CaptureRequirementIfIsTrue( isVerifiedR1333, 1333, @"[In ModLinkAtt Request Type Request Body] The PidTagAddressBookMember property ([MS-OXOABK] section 2.2.6.1) can be modified on an Address Book object that has a display type of DT_DISTLIST."); #endregion #region Call ModLinkAtt to delete the specified PidTagAddressBookMember value. modLinkAttRequestBody.Flags = 1; ModLinkAttResponseBody modLinkAttResponseBodyOfDelete = this.Adapter.ModLinkAtt(modLinkAttRequestBody); Site.Assert.AreEqual<uint>(0, modLinkAttResponseBodyOfDelete.ErrorCode, "ModLinkAtt request should be executed successfully, the returned error code is {0}.", modLinkAttResponseBodyOfDelete.ErrorCode); this.isAddressBookMemberDeleted = true; #endregion #region Call ModLinkAtt with flags 0x00000002 to add the specified PidTagAddressBookMember value. this.Site.Assert.IsTrue(this.isAddressBookMemberDeleted, "The previous added address book member should be deleted, actual is {0}", this.isAddressBookMemberDeleted); modLinkAttRequestBody.Flags = 2; ModLinkAttResponseBody modLinkAttResponseBodyFlags2 = this.Adapter.ModLinkAtt(modLinkAttRequestBody); Site.Assert.AreEqual<uint>(0, modLinkAttResponseBodyFlags2.ErrorCode, "ModLinkAtt request should be executed successfully, the returned error code is {0}.", modLinkAttResponseBodyFlags2.ErrorCode); this.isAddressBookMemberDeleted = false; // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R1325"); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1325 this.Site.CaptureRequirementIfAreEqual<uint>( modLinkAttResponseBodyFlags2.ErrorCode, modLinkAttResponseBodyOfAdd.ErrorCode, 1325, @"[In ModLinkAtt Request Type Request Body] If this field [Flags] is set to different values other than the bit flag fDelete (0x00000001), the server will return the same result."); #endregion #region Call ModLinkAtt to delete the specified PidTagAddressBookMember value. modLinkAttRequestBody.Flags = 1; ModLinkAttResponseBody modLinkAttResponseBodyOfDeleteWithFlags2 = this.Adapter.ModLinkAtt(modLinkAttRequestBody); Site.Assert.AreEqual<uint>(0, modLinkAttResponseBodyOfDeleteWithFlags2.ErrorCode, "The ModLinkAtt request to delete the address book member should be executed successfully, the actual returned error code is {0}.", modLinkAttResponseBodyOfDeleteWithFlags2.ErrorCode); this.isAddressBookMemberDeleted = true; #endregion #region Call ModLinkAtt request to add the specified PidTagAddressBookPublicDelegates value midOfModLinkAtt = 0; entryId = null; GetPropsRequestBody getPropsRequestBodyForPublicDelegates = null; memberName = Common.GetConfigurationPropertyValue("GeneralUserName", this.Site); PropertyTag pidTagAddressBookPublicDelegates = new PropertyTag(); pidTagAddressBookPublicDelegates.PropertyType = (ushort)PropertyTypeValues.PtypMultipleString8; pidTagAddressBookPublicDelegates.PropertyId = (ushort)PropertyID.PidTagAddressBookPublicDelegates; for (int i = 0; i < queryRowsResponseBody.RowCount; i++) { string name = System.Text.Encoding.Unicode.GetString(queryRowsResponseBody.RowData[i].ValueArray[0].Value); if (name.ToLower().Contains(memberName.ToLower())) { PermanentEntryID entryID = AdapterHelper.ParsePermanentEntryIDFromBytes(queryRowsResponseBody.RowData[i].ValueArray[1].Value); DNToMinIdRequestBody requestBodyOfDNToMId = new DNToMinIdRequestBody() { Reserved = 0, HasNames = true, Names = new StringArray_r { CValues = 1, LppzA = new string[] { entryID.DistinguishedName } }, AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; DnToMinIdResponseBody responseBodyOfDNToMinId = this.Adapter.DnToMinId(requestBodyOfDNToMId); midOfModLinkAtt = responseBodyOfDNToMinId.MinimalIds[0]; stat.CurrentRec = midOfModLinkAtt; STAT? statForGetProps = stat; LargePropertyTagArray propertyTagForGetProps = new LargePropertyTagArray() { PropertyTagCount = 2, PropertyTags = new PropertyTag[] { new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypInteger32, PropertyId = (ushort)PropertyID.PidTagDisplayType }, new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypMultipleString8, PropertyId = (ushort)PropertyID.PidTagAddressBookPublicDelegates }, } }; getPropsRequestBodyForPublicDelegates = this.BuildGetPropsRequestBody((uint)0, true, statForGetProps, true, propertyTagForGetProps); GetPropsResponseBody getPropsResponseBody = this.Adapter.GetProps(getPropsRequestBodyForPublicDelegates); this.Site.Assert.AreEqual<uint>(0, getPropsResponseBody.StatusCode, "The GetProps request should be executed successfully, the returned status code is {0}", getPropsResponseBody.StatusCode); this.Site.Assert.AreEqual<uint>(lengthOfErrorCodeValue, (uint)getPropsResponseBody.PropertyValues.Value.PropertyValues[1].Value.Length, "The length of the property value should be equal the ErrorCodeValue: Not Found(0x8004010F)"); uint propertyValue = BitConverter.ToUInt32(getPropsResponseBody.PropertyValues.Value.PropertyValues[1].Value, 0); this.Site.Assert.AreEqual<uint>((uint)ErrorCodeValue.NotFound, propertyValue, "The property value of AddressBookPublicDelegates should be Not Found(0x8004010F), actual value is {0}", propertyValue); } else if (name.ToLower().Contains(this.AdminUserName.ToLower())) { entryId = queryRowsResponseBody.RowData[i].ValueArray[1].Value; } if (midOfModLinkAtt != 0 && entryId != null) { break; } } ModLinkAttRequestBody modLinkAttRequestBodyForPublicDelegates = new ModLinkAttRequestBody(); modLinkAttRequestBodyForPublicDelegates.Flags = 0; modLinkAttRequestBodyForPublicDelegates.PropertyTag = pidTagAddressBookPublicDelegates; modLinkAttRequestBodyForPublicDelegates.MinimalId = midOfModLinkAtt; modLinkAttRequestBodyForPublicDelegates.HasEntryIds = true; modLinkAttRequestBodyForPublicDelegates.EntryIdCount = 1; modLinkAttRequestBodyForPublicDelegates.EntryIDs = new byte[][] { entryId }; modLinkAttRequestBodyForPublicDelegates.AuxiliaryBuffer = auxIn; modLinkAttRequestBodyForPublicDelegates.AuxiliaryBufferSize = (uint)auxIn.Length; this.minimalIDForDeleteAddressBookPublicDelegate = midOfModLinkAtt; this.entryIDBufferForDeleteAddressBookPublicDelegate = entryId; this.isAddressBookPublicDelegateDeleted = false; ModLinkAttResponseBody modLinkAttResponseBodyForAddPublicDelegates = this.Adapter.ModLinkAtt(modLinkAttRequestBodyForPublicDelegates); GetPropsResponseBody getPropsResponseBodyForAddPublicDelegates = this.Adapter.GetProps(getPropsRequestBodyForPublicDelegates); modifyDisplayType = BitConverter.ToUInt32(getPropsResponseBodyForAddPublicDelegates.PropertyValues.Value.PropertyValues[0].Value, 0); propertyValuelength = getPropsResponseBodyForAddPublicDelegates.PropertyValues.Value.PropertyValues[1].Value.Length; // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R1335, the DisplayTypeValues should be {0}, the length of the property value was changed from {1} to {2}.", DisplayTypeValues.DT_MAILUSER.ToString(), lengthOfErrorCodeValue, propertyValuelength); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1335 bool isVerifiedR1335 = (modifyDisplayType == (uint)DisplayTypeValues.DT_MAILUSER) && (propertyValuelength != lengthOfErrorCodeValue); this.Site.CaptureRequirementIfIsTrue( isVerifiedR1335, 1335, @"[In ModLinkAtt Request Type Request Body] The PidTagAddressBookPublicDelegates property ([MS-OXOABK] section 2.2.5.5) can be modified on an Address Book object that has a display type of DT_MAILUSER."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R740, the minimal ID should be {0}, the length of the property value was changed from {1} to {2}.", midOfModLinkAtt, lengthOfErrorCodeValue, propertyValuelength); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R740 bool isVerifiedR740 = (midOfModLinkAtt == (uint)getPropsRequestBodyForPublicDelegates.State.CurrentRec) && ((uint)propertyValuelength != lengthOfErrorCodeValue); this.Site.CaptureRequirementIfIsTrue( isVerifiedR740, 740, @"[In ModLinkAtt Request Type Request Body] MinimalId (4 bytes): A MinimalEntryID structure ([MS-OXNSPI] section 2.3.8.1) that specifies the Minimal Entry ID of the address book row to be modified."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R746."); // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R746, the length of the property value is different, means the property was modified. this.Site.CaptureRequirementIfAreNotEqual<uint>( lengthOfErrorCodeValue, (uint)propertyValuelength, 746, @"[In ModLinkAtt Request Type Request Body] EntryIds: Each entry ID in the array specifies an address book row in which the specified property is to be modified."); #endregion #region Call ModLinkAtt request to delete the specified PidTagAddressBookPublicDelegates value modLinkAttRequestBodyForPublicDelegates.Flags = 1; ModLinkAttResponseBody modLinkAttResponseBodyForDeletePublicDelegates = this.Adapter.ModLinkAtt(modLinkAttRequestBodyForPublicDelegates); this.Site.Assert.AreEqual<uint>((uint)0, modLinkAttResponseBodyForDeletePublicDelegates.ErrorCode, "The ModLinkAtt request to delete address book public delegates should be executed successfully, the returned value is {0}", modLinkAttResponseBodyForDeletePublicDelegates.ErrorCode); this.isAddressBookPublicDelegateDeleted = true; #endregion #region Call Unbind request to destroy the session between the client and the server. this.Unbind(); #endregion }
public void MSOXCMAPIHTTP_S02_TC17_ModProps() { this.CheckMapiHttpIsSupported(); #region Call Bind request type to established a session context with the address book server. this.Bind(); #endregion #region Call DNToMId to get the MIDs of specified user. STAT stat = new STAT(); stat.InitiateStat(); byte[] auxIn = new byte[] { }; uint reserved = 0; string userESSDN = this.AdminUserDN; DNToMinIdRequestBody requestBodyOfDNToMId = new DNToMinIdRequestBody() { Reserved = reserved, HasNames = true, Names = new StringArray_r { CValues = 1, LppzA = new string[] { userESSDN } }, AuxiliaryBuffer = auxIn, AuxiliaryBufferSize = (uint)auxIn.Length }; DnToMinIdResponseBody responseBodyOfdnToMinId = this.Adapter.DnToMinId(requestBodyOfDNToMId); this.Site.Assert.AreEqual((uint)0, responseBodyOfdnToMinId.ErrorCode, "DnToMinId method should be succeed and 0 is expected to be returned. The returned value is {0}.", responseBodyOfdnToMinId.ErrorCode); #endregion #region Call GetMatches to get the specific PidTagAddressBookX509Certificate property to be modified. stat.CurrentRec = responseBodyOfdnToMinId.MinimalIds[0]; uint[] minimalIds = new uint[1] { (uint)responseBodyOfdnToMinId.MinimalIds[0] }; byte[] filter = new byte[] { }; Guid propertyGuid = new Guid(); uint propertyNameId = new uint(); LargePropertyTagArray columns = new LargePropertyTagArray { PropertyTagCount = 1, PropertyTags = new PropertyTag[] { new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypMultipleBinary, PropertyId = (ushort)PropertyID.PidTagAddressBookX509Certificate } } }; GetMatchesRequestBody getMatchRequestBody = this.BuildGetMatchRequestBody(true, stat, true, 1, minimalIds, false, filter, false, propertyGuid, propertyNameId, 1, true, columns); GetMatchesResponseBody getMatchResponseBody = this.Adapter.GetMatches(getMatchRequestBody); this.Site.Assert.AreEqual((uint)0, getMatchResponseBody.ErrorCode, "GetMatches method should be succeed and 0 is expected to be returned. The returned value is {0}.", getMatchResponseBody.ErrorCode); #endregion #region Call ModProps request type with all optional fields. PropertyTag[] propertyTags = new PropertyTag[1]; propertyTags[0].PropertyId = (ushort)PropertyID.PidTagAddressBookX509Certificate; propertyTags[0].PropertyType = (ushort)PropertyTypeValues.PtypMultipleBinary; LargePropertyTagArray propertyTagsToRemove = new LargePropertyTagArray() { PropertyTagCount = 1, PropertyTags = new PropertyTag[] { new PropertyTag { PropertyType = (ushort)PropertyTypeValues.PtypMultipleBinary, PropertyId = (ushort)PropertyID.PidTagAddressBookX509Certificate } } }; ModPropsRequestBody modPropsRequestBody = this.BuildModPropsRequestBody(true, getMatchResponseBody.State.Value, true, propertyTags[0], true, propertyTagsToRemove); ModPropsResponseBody modPropsResponseBody = this.Adapter.ModProps(modPropsRequestBody); Site.Assert.AreEqual<uint>((uint)0, modPropsResponseBody.StatusCode, "ModProps request should succeed and 0 is expected to be returned. The return value is {0}.", modPropsResponseBody.StatusCode); #endregion #region Call ModProps request type without all optional fields. ModPropsRequestBody modPropsRequestBody1 = this.BuildModPropsRequestBody(false, getMatchResponseBody.State.Value, false, propertyTags[0], false, propertyTagsToRemove); ModPropsResponseBody modPropsResponseBody1 = this.Adapter.ModProps(modPropsRequestBody); Site.Assert.AreEqual<uint>((uint)0, modPropsResponseBody1.StatusCode, "ModProps request should succeed and 0 is expected to be returned. The return value is {0}.", modPropsResponseBody1.StatusCode); #endregion #region Call ModProps request type without PropertyTagsToRemove field. ModPropsRequestBody modPropsRequestBody2 = this.BuildModPropsRequestBody(true, getMatchResponseBody.State.Value, true, propertyTags[0], false, propertyTagsToRemove); ModPropsResponseBody modPropsResponseBody2 = this.Adapter.ModProps(modPropsRequestBody); Site.Assert.AreEqual<uint>((uint)0, modPropsResponseBody2.StatusCode, "ModProps request should succeed and 0 is expected to be returned. The return value is {0}.", modPropsResponseBody2.StatusCode); #endregion #region Call ModProps request type without PropertyValues field. ModPropsRequestBody modPropsRequestBody3 = this.BuildModPropsRequestBody(true, getMatchResponseBody.State.Value, false, propertyTags[0], true, propertyTagsToRemove); ModPropsResponseBody modPropsResponseBody3 = this.Adapter.ModProps(modPropsRequestBody); Site.Assert.AreEqual<uint>((uint)0, modPropsResponseBody3.StatusCode, "ModProps request should succeed and 0 is expected to be returned. The return value is {0}.", modPropsResponseBody3.StatusCode); #endregion #region Call ModProps request type without PropertyValues and state fields. ModPropsRequestBody modPropsRequestBody4 = this.BuildModPropsRequestBody(false, getMatchResponseBody.State.Value, false, propertyTags[0], true, propertyTagsToRemove); ModPropsResponseBody modPropsResponseBody4 = this.Adapter.ModProps(modPropsRequestBody); Site.Assert.AreEqual<uint>((uint)0, modPropsResponseBody4.StatusCode, "ModProps request should succeed and 0 is expected to be returned. The return value is {0}.", modPropsResponseBody4.StatusCode); #endregion #region Call ModProps request type without PropertyTagsToRemove and state fields. ModPropsRequestBody modPropsRequestBody5 = this.BuildModPropsRequestBody(false, getMatchResponseBody.State.Value, true, propertyTags[0], false, propertyTagsToRemove); ModPropsResponseBody modPropsResponseBody5 = this.Adapter.ModProps(modPropsRequestBody); Site.Assert.AreEqual<uint>((uint)0, modPropsResponseBody5.StatusCode, "ModProps request should succeed and 0 is expected to be returned. The return value is {0}.", modPropsResponseBody5.StatusCode); #endregion #region Call the Unbind request type to destroy the session context. this.Unbind(); #endregion }
/// <summary> /// This method is used by the client to map a set of distinguished names to a set of Minimal Entry IDs. /// </summary> /// <param name="distinguishedNameToMIdRequestBody">The DnToMinId request type request body.</param> /// <returns>The response body of the DnToMinId request type.</returns> public DnToMinIdResponseBody DnToMinId(DNToMinIdRequestBody distinguishedNameToMIdRequestBody) { CommonResponse commonResponse = this.SendAddressBookRequest(distinguishedNameToMIdRequestBody, RequestType.DNToMId); DnToMinIdResponseBody distinguishedNameToMinIdResponseBody = DnToMinIdResponseBody.Parse(commonResponse.ResponseBodyRawData); this.VerifyDnToMinIdResponseBody(distinguishedNameToMinIdResponseBody); return distinguishedNameToMinIdResponseBody; }