proxygen
HTTPTransactionSMTest.cpp File Reference

Go to the source code of this file.

Classes

class  EgressStateMachineFixture
 
class  IngressStateMachineFixture
 

Functions

 TEST_F (EgressStateMachineFixture, BadEgressTransitions1)
 
 TEST_F (EgressStateMachineFixture, BadEgressTransitions2)
 
 TEST_F (EgressStateMachineFixture, BadEgressTransitions3)
 
 TEST_F (EgressStateMachineFixture, BadEgressTransitions4)
 
 TEST_F (EgressStateMachineFixture, EgressChunkedTransitions)
 
 TEST_F (EgressStateMachineFixture, NormalEgressTransitions)
 
 TEST_F (EgressStateMachineFixture, NormalEgressTransitionsWithTrailers)
 
 TEST_F (EgressStateMachineFixture, WeirdEgressTransitions)
 
 TEST_F (IngressStateMachineFixture, BadIngressTransitions1)
 
 TEST_F (IngressStateMachineFixture, BadIngressTransitions2)
 
 TEST_F (IngressStateMachineFixture, BadIngressTransitions3)
 
 TEST_F (IngressStateMachineFixture, BadIngressTransitions4)
 
 TEST_F (IngressStateMachineFixture, IngressChunkedTransitions)
 
 TEST_F (IngressStateMachineFixture, NormalIngressTransitions)
 
 TEST_F (IngressStateMachineFixture, WeirdIngressTransitions)
 

Function Documentation

TEST_F ( EgressStateMachineFixture  ,
BadEgressTransitions1   
)

Definition at line 50 of file HTTPTransactionSMTest.cpp.

References fail().

50  {
51  follow(HTTPTransactionEgressSM::Event::sendHeaders);
52  follow(HTTPTransactionEgressSM::Event::sendChunkHeader);
53  follow(HTTPTransactionEgressSM::Event::sendBody);
54  fail(HTTPTransactionEgressSM::Event::sendEOM);
55 }
void fail()
TEST_F ( EgressStateMachineFixture  ,
BadEgressTransitions2   
)

Definition at line 57 of file HTTPTransactionSMTest.cpp.

References fail().

57  {
58  fail(HTTPTransactionEgressSM::Event::sendBody);
59 }
void fail()
TEST_F ( EgressStateMachineFixture  ,
BadEgressTransitions3   
)

Definition at line 61 of file HTTPTransactionSMTest.cpp.

References fail().

61  {
62  follow(HTTPTransactionEgressSM::Event::sendHeaders);
63  follow(HTTPTransactionEgressSM::Event::sendBody);
64  follow(HTTPTransactionEgressSM::Event::sendBody);
65  follow(HTTPTransactionEgressSM::Event::sendEOM);
66  fail(HTTPTransactionEgressSM::Event::sendEOM);
67 }
void fail()
TEST_F ( EgressStateMachineFixture  ,
BadEgressTransitions4   
)

Definition at line 69 of file HTTPTransactionSMTest.cpp.

References fail().

69  {
70  follow(HTTPTransactionEgressSM::Event::sendHeaders);
71  follow(HTTPTransactionEgressSM::Event::sendChunkHeader);
72  follow(HTTPTransactionEgressSM::Event::sendBody);
73  follow(HTTPTransactionEgressSM::Event::sendChunkTerminator);
74  follow(HTTPTransactionEgressSM::Event::sendChunkHeader);
75  fail(HTTPTransactionEgressSM::Event::sendChunkTerminator);
76 }
void fail()
TEST_F ( EgressStateMachineFixture  ,
EgressChunkedTransitions   
)

Definition at line 78 of file HTTPTransactionSMTest.cpp.

78  {
79  follow(HTTPTransactionEgressSM::Event::sendHeaders);
80 
81  follow(HTTPTransactionEgressSM::Event::sendChunkHeader);
82  follow(HTTPTransactionEgressSM::Event::sendBody);
83  follow(HTTPTransactionEgressSM::Event::sendChunkTerminator);
84 
85  follow(HTTPTransactionEgressSM::Event::sendChunkHeader);
86  follow(HTTPTransactionEgressSM::Event::sendBody);
87  follow(HTTPTransactionEgressSM::Event::sendChunkTerminator);
88 
89  follow(HTTPTransactionEgressSM::Event::sendChunkHeader);
90  follow(HTTPTransactionEgressSM::Event::sendBody);
91  follow(HTTPTransactionEgressSM::Event::sendChunkTerminator);
92 
93  follow(HTTPTransactionEgressSM::Event::sendTrailers);
94 
95  follow(HTTPTransactionEgressSM::Event::sendEOM);
96  follow(HTTPTransactionEgressSM::Event::eomFlushed);
97 }
TEST_F ( EgressStateMachineFixture  ,
NormalEgressTransitions   
)

Definition at line 99 of file HTTPTransactionSMTest.cpp.

99  {
100  follow(HTTPTransactionEgressSM::Event::sendHeaders);
101  follow(HTTPTransactionEgressSM::Event::sendBody);
102  follow(HTTPTransactionEgressSM::Event::sendBody);
103  follow(HTTPTransactionEgressSM::Event::sendBody);
104  follow(HTTPTransactionEgressSM::Event::sendBody);
105  follow(HTTPTransactionEgressSM::Event::sendEOM);
106 }
TEST_F ( EgressStateMachineFixture  ,
NormalEgressTransitionsWithTrailers   
)

Definition at line 108 of file HTTPTransactionSMTest.cpp.

108  {
109  follow(HTTPTransactionEgressSM::Event::sendHeaders);
110  follow(HTTPTransactionEgressSM::Event::sendBody);
111  follow(HTTPTransactionEgressSM::Event::sendBody);
112  follow(HTTPTransactionEgressSM::Event::sendBody);
113  follow(HTTPTransactionEgressSM::Event::sendBody);
114  follow(HTTPTransactionEgressSM::Event::sendTrailers);
115  follow(HTTPTransactionEgressSM::Event::sendEOM);
116  follow(HTTPTransactionEgressSM::Event::eomFlushed);
117 }
TEST_F ( EgressStateMachineFixture  ,
WeirdEgressTransitions   
)

Definition at line 119 of file HTTPTransactionSMTest.cpp.

119  {
120  follow(HTTPTransactionEgressSM::Event::sendHeaders);
121  follow(HTTPTransactionEgressSM::Event::sendTrailers);
122  follow(HTTPTransactionEgressSM::Event::sendEOM);
123  follow(HTTPTransactionEgressSM::Event::eomFlushed);
124 }
TEST_F ( IngressStateMachineFixture  ,
BadIngressTransitions1   
)

Definition at line 128 of file HTTPTransactionSMTest.cpp.

References fail().

128  {
129  follow(HTTPTransactionIngressSM::Event::onHeaders);
130  follow(HTTPTransactionIngressSM::Event::onChunkHeader);
131  follow(HTTPTransactionIngressSM::Event::onBody);
132  fail(HTTPTransactionIngressSM::Event::onEOM);
133 }
void fail()
TEST_F ( IngressStateMachineFixture  ,
BadIngressTransitions2   
)

Definition at line 135 of file HTTPTransactionSMTest.cpp.

References fail().

135  {
136  fail(HTTPTransactionIngressSM::Event::onBody);
137 }
void fail()
TEST_F ( IngressStateMachineFixture  ,
BadIngressTransitions3   
)

Definition at line 139 of file HTTPTransactionSMTest.cpp.

References fail().

139  {
140  follow(HTTPTransactionIngressSM::Event::onHeaders);
141  follow(HTTPTransactionIngressSM::Event::onBody);
142  follow(HTTPTransactionIngressSM::Event::onBody);
143  follow(HTTPTransactionIngressSM::Event::onEOM);
144  fail(HTTPTransactionIngressSM::Event::onEOM);
145 }
void fail()
TEST_F ( IngressStateMachineFixture  ,
BadIngressTransitions4   
)

Definition at line 147 of file HTTPTransactionSMTest.cpp.

References fail().

147  {
148  follow(HTTPTransactionIngressSM::Event::onHeaders);
149  follow(HTTPTransactionIngressSM::Event::onChunkHeader);
150  follow(HTTPTransactionIngressSM::Event::onBody);
151  follow(HTTPTransactionIngressSM::Event::onChunkComplete);
152  follow(HTTPTransactionIngressSM::Event::onChunkHeader);
153  fail(HTTPTransactionIngressSM::Event::onChunkComplete);
154 }
void fail()
TEST_F ( IngressStateMachineFixture  ,
IngressChunkedTransitions   
)

Definition at line 156 of file HTTPTransactionSMTest.cpp.

156  {
157  follow(HTTPTransactionIngressSM::Event::onHeaders);
158 
159  follow(HTTPTransactionIngressSM::Event::onChunkHeader);
160  follow(HTTPTransactionIngressSM::Event::onBody);
161  follow(HTTPTransactionIngressSM::Event::onChunkComplete);
162 
163  follow(HTTPTransactionIngressSM::Event::onChunkHeader);
164  follow(HTTPTransactionIngressSM::Event::onBody);
165  follow(HTTPTransactionIngressSM::Event::onChunkComplete);
166 
167  follow(HTTPTransactionIngressSM::Event::onChunkHeader);
168  follow(HTTPTransactionIngressSM::Event::onBody);
169  follow(HTTPTransactionIngressSM::Event::onChunkComplete);
170 
171  follow(HTTPTransactionIngressSM::Event::onTrailers);
172  follow(HTTPTransactionIngressSM::Event::onEOM);
173 }
TEST_F ( IngressStateMachineFixture  ,
NormalIngressTransitions   
)

Definition at line 175 of file HTTPTransactionSMTest.cpp.

175  {
176  follow(HTTPTransactionIngressSM::Event::onHeaders);
177  follow(HTTPTransactionIngressSM::Event::onBody);
178  follow(HTTPTransactionIngressSM::Event::onBody);
179  follow(HTTPTransactionIngressSM::Event::onBody);
180  follow(HTTPTransactionIngressSM::Event::onBody);
181  follow(HTTPTransactionIngressSM::Event::onEOM);
182 }
TEST_F ( IngressStateMachineFixture  ,
WeirdIngressTransitions   
)

Definition at line 184 of file HTTPTransactionSMTest.cpp.

184  {
185  follow(HTTPTransactionIngressSM::Event::onHeaders);
186  follow(HTTPTransactionIngressSM::Event::onTrailers);
187  follow(HTTPTransactionIngressSM::Event::onEOM);
188 }