Lines Matching refs:prot

101       prot = Thrift::BaseProtocol.new(double("transport"))
102 expect(prot).to receive(:read_struct_begin).twice
103 expect(prot).to receive(:read_struct_end).twice
104 expect(prot).to receive(:read_field_begin).and_return(
115 expect(prot).to receive(:read_field_end).exactly(7).times
116 expect(prot).to receive(:read_map_begin).and_return(
121 expect(prot).to receive(:read_map_end).exactly(3).times
122 expect(prot).to receive(:read_list_begin).and_return([Thrift::Types::I32, 4])
123 expect(prot).to receive(:read_list_end)
124 expect(prot).to receive(:read_set_begin).and_return([Thrift::Types::I16, 2])
125 expect(prot).to receive(:read_set_end)
126 expect(prot).to receive(:read_i32).and_return(
131 …expect(prot).to receive(:read_string).and_return("pi", "e", "feigenbaum", "apple banana", "what's …
132 expect(prot).to receive(:read_double).and_return(Math::PI, Math::E, 4.669201609)
133 expect(prot).to receive(:read_i16).and_return(2, 3)
134 expect(prot).not_to receive(:skip)
135 struct.read(prot)
147 prot = Thrift::BinaryProtocol.new(Thrift::MemoryBufferTransport.new)
148 expect(prot).to receive(:write_bool).with(false)
149 b.write(prot)
154 prot = Thrift::BaseProtocol.new(double("transport"))
155 expect(prot).to receive(:read_struct_begin)
156 expect(prot).to receive(:read_struct_end)
157 expect(prot).to receive(:read_field_begin).and_return(
165 expect(prot).to receive(:read_field_end).exactly(5).times
166 expect(prot).to receive(:read_i32).and_return(42)
167 expect(prot).to receive(:read_string).and_return("foobar")
168 expect(prot).to receive(:skip).with(Thrift::Types::STRUCT)
169 expect(prot).to receive(:skip).with(Thrift::Types::MAP)
172 expect(prot).to receive(:skip).with(Thrift::Types::I32)
173 struct.read(prot)
184 prot = Thrift::BaseProtocol.new(double("transport")) #mock("Protocol")
185 expect(prot).to receive(:write_struct_begin).with("SpecNamespace::Foo")
186 expect(prot).to receive(:write_struct_begin).with("SpecNamespace::Hello")
187 expect(prot).to receive(:write_struct_end).twice
188 expect(prot).to receive(:write_field_begin).with('ints', Thrift::Types::LIST, 4)
189 expect(prot).to receive(:write_i32).with(1)
190 expect(prot).to receive(:write_i32).with(2).twice
191 expect(prot).to receive(:write_i32).with(3)
192 expect(prot).to receive(:write_field_begin).with('complex', Thrift::Types::MAP, 5)
193 expect(prot).to receive(:write_i32).with(5)
194 expect(prot).to receive(:write_string).with('foo')
195 expect(prot).to receive(:write_double).with(1.23)
196 expect(prot).to receive(:write_field_begin).with('shorts', Thrift::Types::SET, 6)
197 expect(prot).to receive(:write_i16).with(5)
198 expect(prot).to receive(:write_i16).with(17)
199 expect(prot).to receive(:write_i16).with(239)
200 expect(prot).to receive(:write_field_stop).twice
201 expect(prot).to receive(:write_field_end).exactly(6).times
202 expect(prot).to receive(:write_field_begin).with('simple', Thrift::Types::I32, 1)
203 expect(prot).to receive(:write_i32).with(53)
204 expect(prot).to receive(:write_field_begin).with('hello', Thrift::Types::STRUCT, 3)
205 expect(prot).to receive(:write_field_begin).with('greeting', Thrift::Types::STRING, 1)
206 expect(prot).to receive(:write_string).with('hello, world!')
207 expect(prot).to receive(:write_map_begin).with(Thrift::Types::I32, Thrift::Types::MAP, 1)
208 … expect(prot).to receive(:write_map_begin).with(Thrift::Types::STRING, Thrift::Types::DOUBLE, 1)
209 expect(prot).to receive(:write_map_end).twice
210 expect(prot).to receive(:write_list_begin).with(Thrift::Types::I32, 4)
211 expect(prot).to receive(:write_list_end)
212 expect(prot).to receive(:write_set_begin).with(Thrift::Types::I16, 3)
213 expect(prot).to receive(:write_set_end)
218 struct.write(prot)
259 prot = Thrift::BaseProtocol.new(double("trans"))
260 expect(prot).to receive(:write_struct_begin).with("SpecNamespace::Xception")
261 expect(prot).to receive(:write_struct_end)
262 …expect(prot).to receive(:write_field_begin).with('message', Thrift::Types::STRING, 1)#, "something…
263 expect(prot).to receive(:write_string).with("something happened")
264 expect(prot).to receive(:write_field_begin).with('code', Thrift::Types::I32, 2)#, 1)
265 expect(prot).to receive(:write_i32).with(1)
266 expect(prot).to receive(:write_field_stop)
267 expect(prot).to receive(:write_field_end).twice
269 e.write(prot)
279 prot = Thrift::BaseProtocol.new(double("trans"))
280 expect(prot).to receive(:write_struct_begin).with("SpecNamespace::Xception")
281 expect(prot).to receive(:write_struct_end)
282 expect(prot).to receive(:write_field_begin).with('message', Thrift::Types::STRING, 1)
283 expect(prot).to receive(:write_string).with("something happened")
284 expect(prot).to receive(:write_field_begin).with('code', Thrift::Types::I32, 2)
285 expect(prot).to receive(:write_i32).with(5)
286 expect(prot).to receive(:write_field_stop)
287 expect(prot).to receive(:write_field_end).twice
289 e.write(prot)