private bool VerifyTypeAndIdForFieldDefinition(GetListResponseGetListResult responseOfGetList, string expectedFieldName, string expectedFieldId, string expectedFieldType)
{
if (string.IsNullOrEmpty(expectedFieldName))
{
throw new ArgumentNullException("expectedFieldName");
}
// Get the field definition from response.
FieldDefinition fieldDefinition = Common.GetFieldItemByName(responseOfGetList, expectedFieldName, this.Site);
// Verify field type.
this.Site.Assert.IsTrue(
Common.VerifyFieldType(fieldDefinition, expectedFieldType, this.Site),
@"The field definition's type should match the specified value in protocol.");
// Verify field id.
this.Site.Assert.IsTrue(
Common.VerifyFieldId(fieldDefinition, expectedFieldId, this.Site),
@"The field definition's id should match the specified value in protocol.");
// If upon verifications pass, return true.
return true;
}
}