Å×½ºÆ® :: HTTP.

HTTP »óÈ£ ÀÛ¿ë Å×½ºÆ®
Áö±Ý ´Ù¿î·Îµå

Å×½ºÆ® :: HTTP. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Luke Closs
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~lukec/Test-Mock-LWP-0.05/lib/Test/Mock/LWP.pm

Å×½ºÆ® :: HTTP. ű×


Å×½ºÆ® :: HTTP. ¼³¸í

Test :: HTTP´Â REST Çü Services.each Test :: HTTP °´Ã¼¿¡ ´ëÇÑ »óÅ°¡ ÇöÀç ¿äû ¹× ÇØ´ç ÀÀ´ä¿¡ ´ëÇÑ »óŸ¦ Æ÷ÇÔ ÇÒ ¼öÀÖ´Â HTTP ¼öÁØÀÇ °Íµé¿¡ ´ëÇØ ÁÖ·Î Å×½ºÆ®¸¦ ½±°Ô ÀÛ¼ºÇÏ´Â °ÍÀ» ½±°Ô ÇÒ ¼ö ÀÖµµ·Ï ¼³°èµÈ Perl ¸ðµâÀÔ´Ï´Ù. ÀÌ·¸°ÔÇÏ¸é ¿äûÀ» º¸³»°í »óÅ ÄÚµå, Çì´õ ¹× ¸Þ½ÃÁö º»¹®À» È®ÀÎÇϱâÀ§ÇÑ Æí¸®ÇÑ ¼Ó±â°¡ Æí¸®ÇÕ´Ï´Ù. Å×½ºÆ® :: HTTP TESTS => 9; {MY $ URI = "$ base / data / page / foo_bar_baz"; ³» $ type = 'text / x.waki-wiki'; MY $ TEST = TEST :: HTTP-> NEW ( 'HTTP ÆäÀÌÁö »ý¼º ¹× »èÁ¦'); $ test-> get ($ uri, {accept => $ type}); $ test-> status_code_is (404, "¾ÆÁ÷ ¾øÀ½);"); $ test-> put ($ uri, { 'content-type'=> $ type}, 'xyzzy'); $ test-> status_code_is (201, "retiture 201."Put); # »ý¼º µÈ $ test-> header_is ( 'content-type'=> $ type, "put on cutter-type ÀÏÄ¡"); $ test-> header_like (location => qr {^ $ base / data / page /}, "»ý¼º µÈ ÆäÀÌÁö À§Ä¡°¡ Àǹ̰¡ ÀÖ½À´Ï´Ù."); $ test-> body_is ( 'xyzzy'); $ test-> get ($ uri, {accept => $ type}); $ test-> status_code_is (200, "ÆäÀÌÁö°¡ ÀÖ½À´Ï´Ù."); $ test-> header_is ( 'content-type'=> $ type, "Content-type match on get."); $ test-> body_is ( 'xyzzy'); $ test-> »èÁ¦ ($ URI); $ test-> status_code_is (204, "»èÁ¦ ¸®ÅÏ 204."»èÁ¦); # ¾Æ´Ï¿À content} Á¦Ç° ȨÆäÀÌÁö


Å×½ºÆ® :: HTTP. °ü·Ã ¼ÒÇÁÆ®¿þ¾î