public static FakeOrganzationService ExpectActionTakenUpdate( this FakeOrganzationService service, EntityReference targetApprovalRequest, Entity target) { return(service.ExpectUpdate( (updateEntity) => { Assert.AreEqual( targetApprovalRequest, updateEntity.ToEntityReference(), "It is not updating the correct approval request record or the entity type is incorrect."); Assert.AreEqual( target.ToEntityReference(), updateEntity.GetAttributeValue <EntityReference>("fdbzap_ar_actiontaken"), "Action Taken does not reference the action ran."); Assert.AreEqual( 4, updateEntity.GetAttributeValue <OptionSetValue>("statuscode").Value, "Statuscode should be 4, action taken."); })); }