| 152 | } |
| 153 | |
| 154 | void HttpHeaderTest::testClearField() |
| 155 | { |
| 156 | HttpHeader h; |
| 157 | h.setStatusCode(200); |
| 158 | h.setVersion("HTTP/1.1"); |
| 159 | h.put(HttpHeader::LINK, "Bar"); |
| 160 | |
| 161 | CPPUNIT_ASSERT_EQUAL(std::string("Bar"), h.find(HttpHeader::LINK)); |
| 162 | |
| 163 | h.clearField(); |
| 164 | |
| 165 | CPPUNIT_ASSERT_EQUAL(std::string(""), h.find(HttpHeader::LINK)); |
| 166 | CPPUNIT_ASSERT_EQUAL(200, h.getStatusCode()); |
| 167 | CPPUNIT_ASSERT_EQUAL(std::string("HTTP/1.1"), h.getVersion()); |
| 168 | } |
| 169 | |
| 170 | void HttpHeaderTest::testFieldContains() |
| 171 | { |
nothing calls this directly
no test coverage detected