Method: Sbmt::Pact::Consumer::GrpcInteractionBuilder#validate!

Defined in:
lib/sbmt/pact/consumer/grpc_interaction_builder.rb

#validate!Object



116
117
118
119
120
# File 'lib/sbmt/pact/consumer/grpc_interaction_builder.rb', line 116

def validate!
  raise InteractionBuilderError.new("uninitialized service params, use #with_service to configure") if @proto_path.blank? || @service_name.blank? || @method_name.blank?
  raise InteractionBuilderError.new("invalid request format, should be a hash") unless @request.is_a?(Hash)
  raise InteractionBuilderError.new("invalid response format, should be a hash") unless @response.is_a?(Hash) || @response_meta.is_a?(Hash)
end