libs-base/Tests/base/NSURLConnection/Helpers
Sergei Golovin fc07538462 fix issue with HTTP socket wasn't freed at the end of request-response cycle
Connection closing by client demand doesn't work but
   it isn't important for purposes of testing so commented out
2024-03-11 19:18:57 +04:00
..
GNUmakefile Some testcase reliability improvements 2016-07-01 15:22:35 +00:00
NSURLConnectionTest.h update actual mail address 2024-03-11 19:18:57 +04:00
NSURLConnectionTest.m Merge changes for NSURLSession from EngageHub (formerly Brainstorm). 2020-11-29 06:57:47 -05:00
README Add NSURLConnection patch by Sergei Golovin 2014-11-29 11:39:38 +00:00
RequestHandler.h update actual mail address 2024-03-11 19:18:57 +04:00
RequestHandler.m update actual mail address 2024-03-11 19:18:57 +04:00
SimpleWebServer.h change to use NSFileHandle instead of streams 2024-03-11 19:18:57 +04:00
SimpleWebServer.m fix issue with HTTP socket wasn't freed at the end of request-response cycle 2024-03-11 19:18:57 +04:00
TestCase.h Add NSURLConnection patch by Sergei Golovin 2014-11-29 11:39:38 +00:00
TestCase.m Merge changes for NSURLSession from EngageHub (formerly Brainstorm). 2020-11-29 06:57:47 -05:00
testCert.pem Add NSURLConnection patch by Sergei Golovin 2014-11-29 11:39:38 +00:00
testKey.pem Add NSURLConnection patch by Sergei Golovin 2014-11-29 11:39:38 +00:00
testTestWebServer.m Merge changes for NSURLSession from EngageHub (formerly Brainstorm). 2020-11-29 06:57:47 -05:00
TestWebServer.h Merge changes for NSURLSession from EngageHub (formerly Brainstorm). 2020-11-29 06:57:47 -05:00
TestWebServer.m Merge changes for NSURLSession from EngageHub (formerly Brainstorm). 2020-11-29 06:57:47 -05:00

The directory contains classes useful in testing of web-clients.
They are written mainly with the necessity to test the class NSURLConnection
in mind.

TestCase
NSURLConnectionTest
	is a child of TestCase and represents a test of NSURLConnection.
	It starts a main instance and (if needed) an auxillary instance
	of TestWebServer (or uses externally supplied ones). Then it makes
	a custom request to check various functionality of NSURLConnection.

TestWebServer
	maintains it's own instance of SimpleWebServer and implements
	SimpleWebServer delegate's protocol to dispatch any request
	to a corresponding handler. It can call it's delegate during
	proceeding of requests.

RequestHandler
TestHandler and it's descendants
	handle requests (dispatched by TestWebServer) and produces
	a custom response. It also calls it's delegate (using TestWebServer
	delegate's protocol) during request handling.

SimpleWebServer
	The own implementation of a web server.

The key protocols important for understanding are TestProgress (TestCase.h)
and TestWebServerDelegate (TestWebServer.h). Alternatively the file 
NSURLConnectionTest.h briefly describes the whole picture.