xref: /haiku/src/tests/kits/net/service/DataTest.h (revision ed24eb5ff12640d052171c6a7feba37fab8a75d1)
1 /*
2  * Copyright 2014-2021 Haiku, inc.
3  * Distributed under the terms of the MIT License.
4  */
5 
6 
7 #ifndef DATA_TEST_H
8 #define DATA_TEST_H
9 
10 
11 #include <Url.h>
12 #include <UrlProtocolListener.h>
13 
14 #include <TestCase.h>
15 #include <TestSuite.h>
16 
17 #include <cppunit/TestSuite.h>
18 
19 
20 using BPrivate::Network::BUrlProtocolListener;
21 using BPrivate::Network::BUrlRequest;
22 
23 
24 class DataTest: public BTestCase {
25 public:
26 								DataTest();
27 	virtual						~DataTest();
28 
29 			void				SimpleTest();
30 			void				EmptyTest();
31 			void				InvalidTest();
32 			void				CharsetTest();
33 			void				Base64Test();
34 			void				UrlDecodeTest();
35 
36 	static	void				AddTests(BTestSuite& suite);
37 
38 private:
39 			void				_RunTest(BString url, const char* expected,
40 									size_t expectedLength);
41 };
42 
43 
44 #endif
45 
46