Lines Matching refs:protocol
32 protocol = Thrift::BaseProtocol.new(double("transport"))
33 expect(protocol).to receive(:write_struct_begin).with("SpecNamespace::Hello")
34 expect(protocol).to receive(:write_field_begin).with("greeting", Thrift::Types::STRING, 1)
35 expect(protocol).to receive(:write_string).with("Good day")
36 expect(protocol).to receive(:write_field_end)
37 expect(protocol).to receive(:write_field_stop)
38 expect(protocol).to receive(:write_struct_end)
40 allow(protocol_factory).to receive(:get_protocol).and_return(protocol)
54 protocol = Thrift::BaseProtocol.new(double("transport"))
55 expect(protocol).to receive(:read_struct_begin).and_return("SpecNamespace::Hello")
56 … expect(protocol).to receive(:read_field_begin).and_return(["greeting", Thrift::Types::STRING, 1],
58 expect(protocol).to receive(:read_string).and_return("Good day")
59 expect(protocol).to receive(:read_field_end)
60 expect(protocol).to receive(:read_struct_end)
62 allow(protocol_factory).to receive(:get_protocol).and_return(protocol)