]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/testAuth.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / tests / testAuth.h
1 /*
2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef SQUID_SRC_TEST_AUTH_H
10 #define SQUID_SRC_TEST_AUTH_H
11
12 #if USE_AUTH
13
14 #include "compat/cppunit.h"
15
16 /*
17 * test the auth Config framework
18 */
19
20 class testAuth : public CPPUNIT_NS::TestFixture
21 {
22 CPPUNIT_TEST_SUITE( testAuth );
23 CPPUNIT_TEST( instantiate );
24 CPPUNIT_TEST_SUITE_END();
25
26 public:
27
28 protected:
29 void instantiate();
30 };
31
32 class testAuthConfig : public CPPUNIT_NS::TestFixture
33 {
34 CPPUNIT_TEST_SUITE( testAuthConfig );
35 CPPUNIT_TEST( create );
36 CPPUNIT_TEST_SUITE_END();
37
38 public:
39
40 protected:
41 void create();
42 };
43
44 class testAuthUserRequest : public CPPUNIT_NS::TestFixture
45 {
46 CPPUNIT_TEST_SUITE( testAuthUserRequest );
47 CPPUNIT_TEST( scheme );
48 CPPUNIT_TEST_SUITE_END();
49
50 public:
51
52 protected:
53 void scheme();
54 void construction();
55 };
56
57 #if HAVE_AUTH_MODULE_BASIC
58 #include "auth/basic/UserRequest.h"
59 class testAuthBasicUserRequest : public CPPUNIT_NS::TestFixture
60 {
61 CPPUNIT_TEST_SUITE( testAuthBasicUserRequest );
62 CPPUNIT_TEST( construction );
63 CPPUNIT_TEST( username );
64 CPPUNIT_TEST_SUITE_END();
65
66 public:
67
68 protected:
69 void construction();
70 void username();
71 };
72 #endif
73
74 #if HAVE_AUTH_MODULE_DIGEST
75 #include "auth/digest/UserRequest.h"
76 class testAuthDigestUserRequest : public CPPUNIT_NS::TestFixture
77 {
78 CPPUNIT_TEST_SUITE( testAuthDigestUserRequest );
79 CPPUNIT_TEST( construction );
80 CPPUNIT_TEST( username );
81 CPPUNIT_TEST_SUITE_END();
82
83 public:
84
85 protected:
86 void construction();
87 void username();
88 };
89 #endif
90
91 #if HAVE_AUTH_MODULE_NTLM
92 #include "auth/ntlm/UserRequest.h"
93 class testAuthNTLMUserRequest : public CPPUNIT_NS::TestFixture
94 {
95 CPPUNIT_TEST_SUITE( testAuthNTLMUserRequest );
96 CPPUNIT_TEST( construction );
97 CPPUNIT_TEST( username );
98 CPPUNIT_TEST_SUITE_END();
99
100 public:
101
102 protected:
103 void construction();
104 void username();
105 };
106 #endif
107
108 #if HAVE_AUTH_MODULE_NEGOTIATE
109 #include "auth/negotiate/UserRequest.h"
110 class testAuthNegotiateUserRequest : public CPPUNIT_NS::TestFixture
111 {
112 CPPUNIT_TEST_SUITE( testAuthNegotiateUserRequest );
113 CPPUNIT_TEST( construction );
114 CPPUNIT_TEST( username );
115 CPPUNIT_TEST_SUITE_END();
116
117 public:
118
119 protected:
120 void construction();
121 void username();
122 };
123 #endif
124
125 #endif /* USE_AUTH */
126 #endif /* SQUID_SRC_TEST_AUTH_H */
127