xref: /haiku/src/tests/apps/haikudepot/JwtTokenHelperTest.h (revision e1c4049fed1047bdb957b0529e1921e97ef94770)
1 /*
2  * Copyright 2023, Andrew Lindesay <apl@lindesay.co.nz>
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef JWT_TOKEN_HELPER_TEST_H
6 #define JWT_TOKEN_HELPER_TEST_H
7 
8 
9 #include <Message.h>
10 
11 #include <TestCase.h>
12 #include <TestSuite.h>
13 
14 
15 class JwtTokenHelperTest : public CppUnit::TestCase {
16 public:
17 								JwtTokenHelperTest();
18 	virtual						~JwtTokenHelperTest();
19 
20 			void				TestParseTokenClaims();
21 			void				TestCorrupt();
22 
23 	static	void				AddTests(BTestSuite& suite);
24 
25 private:
26 			void				_AssertStringValue(const BMessage& message, const char* key,
27 									const char* expectedValue) const;
28 			void				_AssertDoubleValue(const BMessage& message, const char* key,
29 									int64 expectedValue) const;
30 };
31 
32 
33 #endif	// JWT_TOKEN_HELPER_TEST_H
34