Lines Matching full:to

2 # Licensed to the Apache Software Foundation (ASF) under one
6 # to you under the Apache License, Version 2.0 (the
12 # Unless required by applicable law or agreed to in writing,
27 expect(e.message).to eq("test message")
33 expect(Thrift::ApplicationException.superclass).to eq(Thrift::Exception)
38 expect(e.type).to eq(Thrift::ApplicationException::UNKNOWN)
39 expect(e.message).to be_nil
41 expect(e.type).to eq(Thrift::ApplicationException::UNKNOWN_METHOD)
42 expect(e.message).to eq("test message")
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
60 expect(e.message).to eq("test message")
61 expect(e.type).to eq(Thrift::ApplicationException::BAD_SEQUENCE_ID)
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
82 expect(e.message).to be_nil
83 expect(e.type).to eq(Thrift::ApplicationException::INVALID_MESSAGE_TYPE)
86 it "should write a Thrift::ApplicationException struct to the oprot" do
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
101 it "should skip nil fields when writing to the oprot" do
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
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
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
137 expect(prot.type).to eq(Thrift::ProtocolException::SIZE_LIMIT)
138 expect(prot.message).to eq("message")