public void MSOXWSCONT_S03_TC01_CopyContactItem()
{
#region Step 1:Create the contact item.
// Create a contact item.
ContactItemType item = this.BuildContactItemWithRequiredProperties();
CreateItemResponseType createItemResponse = this.CallCreateItemOperation(item);
// Check the response.
Common.CheckOperationSuccess(createItemResponse, 1, this.Site);
#endregion
#region Step 2:Copy the contact item.
CopyItemType copyItemRequest = new CopyItemType();
CopyItemResponseType copyItemResponse = new CopyItemResponseType();
// Configure ItemIds.
copyItemRequest.ItemIds = new BaseItemIdType[1];
copyItemRequest.ItemIds[0] = this.ExistContactItems[0];
// Configure the copy Distinguished Folder.
DistinguishedFolderIdType distinguishedFolderIdForCopyItem = new DistinguishedFolderIdType();
distinguishedFolderIdForCopyItem.Id = DistinguishedFolderIdNameType.drafts;
copyItemRequest.ToFolderId = new TargetFolderIdType();
copyItemRequest.ToFolderId.Item = distinguishedFolderIdForCopyItem;
copyItemResponse = this.CONTAdapter.CopyItem(copyItemRequest);
// Check the response.
Common.CheckOperationSuccess(copyItemResponse, 1, this.Site);
#endregion
#region Step 3:Get the contact item.
// The contact item to get.
ItemIdType[] itemArray = new ItemIdType[this.ExistContactItems.Count];
this.ExistContactItems.CopyTo(itemArray, 0);
GetItemResponseType getItemResponse = this.CallGetItemOperation(itemArray);
// Check the response.
Common.CheckOperationSuccess(getItemResponse, 2, this.Site);
#endregion
}
#endregion