Lines Matching refs:prot

46       prot = double("MockProtocol")
47 expect(prot).to receive(:read_struct_begin).ordered
48 expect(prot).to receive(:read_field_begin).exactly(3).times.and_return(
53 expect(prot).to receive(:read_string).ordered.and_return "test message"
54 …expect(prot).to receive(:read_i32).ordered.and_return Thrift::ApplicationException::BAD_SEQUENCE_ID
55 expect(prot).to receive(:read_field_end).exactly(2).times
56 expect(prot).to receive(:read_struct_end).ordered
59 e.read(prot)
65 prot = double("MockProtocol")
66 expect(prot).to receive(:read_struct_begin).ordered
67 expect(prot).to receive(:read_field_begin).exactly(5).times.and_return(
74 … expect(prot).to receive(:read_i32).and_return Thrift::ApplicationException::INVALID_MESSAGE_TYPE
75 expect(prot).to receive(:skip).with(Thrift::Types::STRING).twice
76 expect(prot).to receive(:skip).with(Thrift::Types::MAP)
77 expect(prot).to receive(:read_field_end).exactly(4).times
78 expect(prot).to receive(:read_struct_end).ordered
81 e.read(prot)
87 prot = double("MockProtocol")
88 expect(prot).to receive(:write_struct_begin).with("Thrift::ApplicationException").ordered
89 expect(prot).to receive(:write_field_begin).with("message", Thrift::Types::STRING, 1).ordered
90 expect(prot).to receive(:write_string).with("test message").ordered
91 expect(prot).to receive(:write_field_begin).with("type", Thrift::Types::I32, 2).ordered
92 expect(prot).to receive(:write_i32).with(Thrift::ApplicationException::UNKNOWN_METHOD).ordered
93 expect(prot).to receive(:write_field_end).twice
94 expect(prot).to receive(:write_field_stop).ordered
95 expect(prot).to receive(:write_struct_end).ordered
98 e.write(prot)
102 prot = double("MockProtocol")
103 expect(prot).to receive(:write_struct_begin).with("Thrift::ApplicationException").ordered
104 expect(prot).to receive(:write_field_begin).with("message", Thrift::Types::STRING, 1).ordered
105 expect(prot).to receive(:write_string).with("test message").ordered
106 expect(prot).to receive(:write_field_end).ordered
107 expect(prot).to receive(:write_field_stop).ordered
108 expect(prot).to receive(:write_struct_end).ordered
111 e.write(prot)
113 prot = double("MockProtocol")
114 expect(prot).to receive(:write_struct_begin).with("Thrift::ApplicationException").ordered
115 expect(prot).to receive(:write_field_begin).with("type", Thrift::Types::I32, 2).ordered
116 … expect(prot).to receive(:write_i32).with(Thrift::ApplicationException::BAD_SEQUENCE_ID).ordered
117 expect(prot).to receive(:write_field_end).ordered
118 expect(prot).to receive(:write_field_stop).ordered
119 expect(prot).to receive(:write_struct_end).ordered
122 e.write(prot)
124 prot = double("MockProtocol")
125 expect(prot).to receive(:write_struct_begin).with("Thrift::ApplicationException").ordered
126 expect(prot).to receive(:write_field_stop).ordered
127 expect(prot).to receive(:write_struct_end).ordered
130 e.write(prot)
136 prot = Thrift::ProtocolException.new(Thrift::ProtocolException::SIZE_LIMIT, "message")
137 expect(prot.type).to eq(Thrift::ProtocolException::SIZE_LIMIT)
138 expect(prot.message).to eq("message")