Method: #sanity_check_values_of_accessors

Defined in:
src/ruby/spec/generic/client_stub_spec.rb

#sanity_check_values_of_accessors(op_view, expected_metadata, expected_trailing_metadata) ⇒ Object


64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'src/ruby/spec/generic/client_stub_spec.rb', line 64

def sanity_check_values_of_accessors(op_view,
                                     ,
                                     )
  expected_status = Struct::Status.new
  expected_status.code = 0
  expected_status.details = 'OK'
  expected_status. = 

  expect(op_view.status).to eq(expected_status)
  expect(op_view.).to eq()
  expect(op_view.).to eq()

  expect(op_view.cancelled?).to be(false)
  expect(op_view.write_flag).to be(nil)

  # The deadline attribute of a call can be either
  # a GRPC::Core::TimeSpec or a Time, which are mutually exclusive.
  # TODO: fix so that the accessor always returns the same type.
  expect(op_view.deadline.is_a?(GRPC::Core::TimeSpec) ||
         op_view.deadline.is_a?(Time)).to be(true)
end