Files
o3de/Gems/AWSCore/Code/Tests/Credential/AWSCVarCredentialHandlerTest.cpp
T
Steve Pham b4a2edec6a Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
2021-06-30 19:51:55 -07:00

41 lines
1.2 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzCore/UnitTest/TestTypes.h>
#include <AzTest/AzTest.h>
#include <Credential/AWSCVarCredentialHandler.h>
using namespace AWSCore;
class AWSCVarCredentialHandlerTest
: public UnitTest::ScopedAllocatorSetupFixture
{
public:
AWSCVarCredentialHandlerTest() = default;
virtual ~AWSCVarCredentialHandlerTest() = default;
void SetUp() override
{
m_credentialHandler = AZStd::make_unique<AWSCVarCredentialHandler>();
}
AZStd::unique_ptr<AWSCVarCredentialHandler> m_credentialHandler;
};
TEST_F(AWSCVarCredentialHandlerTest, GetCredentialsProvider_WhenCVarValuesAreEmpty_GetNullptr)
{
auto actualCredentialsProvider = m_credentialHandler->GetCredentialsProvider();
EXPECT_FALSE(actualCredentialsProvider);
}
TEST_F(AWSCVarCredentialHandlerTest, GetCredentialHandlerOrder_Call_AlwaysGetExpectedValue)
{
auto actualOrder = m_credentialHandler->GetCredentialHandlerOrder();
EXPECT_EQ(actualOrder, CredentialHandlerOrder::CVAR_CREDENTIAL_HANDLER);
}