1/*
2 * Copyright 2016, Andrew Lindesay, apl@lindesay.co.nz
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef NETWORK_URL_TEST_H
6#define NETWORK_URL_TEST_H
7
8
9#include <TestCase.h>
10#include <TestSuite.h>
11
12
13class NetworkUrlTest : public CppUnit::TestCase {
14public:
15								NetworkUrlTest();
16	virtual						~NetworkUrlTest();
17
18	virtual	void				setUp();
19	virtual	void				tearDown();
20
21			void				TestValidFullUrl();
22
23			void				TestFileUrl();
24
25			void				TestWithUserNameAndPasswordNoHostAndPort();
26			void				TestHostAndPortWithNoUserNameAndPassword();
27			void				TestHostWithNoPortOrUserNameAndPassword();
28			void				TestHostWithNoPortNoPath();
29			void				TestHostWithPortNoPath();
30			void				TestHostWithEmptyPort();
31			void				TestHostWithPathAndFragment();
32			void				TestHostWithFragment();
33			void				TestIpv6HostPortPathAndRequest();
34			void				TestProtocol();
35			void				TestMailTo();
36			void				TestDataUrl();
37
38			void				TestAuthorityNoUserName();
39			void				TestAuthorityWithCredentialsSeparatorNoPassword();
40			void				TestAuthorityWithoutCredentialsSeparatorNoPassword();
41			void				TestAuthorityBadPort();
42
43			void				TestWhitespaceBefore();
44			void				TestWhitespaceAfter();
45			void				TestWhitespaceMiddle();
46			void				TestHttpNoHost();
47			void				TestEmpty();
48			void				TestBadHosts();
49
50	static	void				AddTests(BTestSuite& suite);
51
52};
53
54
55#endif	// NETWORK_URL_TEST_H
56