|
@@ -96,7 +96,8 @@ namespace AWSClientAuthUnitTest
|
|
ON_CALL(*this, GetResourceNameId).WillByDefault(testing::Return(TEST_RESOURCE_NAME_ID));
|
|
ON_CALL(*this, GetResourceNameId).WillByDefault(testing::Return(TEST_RESOURCE_NAME_ID));
|
|
ON_CALL(*this, GetDefaultRegion).WillByDefault(testing::Return(TEST_REGION));
|
|
ON_CALL(*this, GetDefaultRegion).WillByDefault(testing::Return(TEST_REGION));
|
|
}
|
|
}
|
|
- ~AWSResourceMappingRequestBusMock()
|
|
|
|
|
|
+
|
|
|
|
+ ~AWSResourceMappingRequestBusMock() override
|
|
{
|
|
{
|
|
AWSCore::AWSResourceMappingRequestBus::Handler::BusDisconnect();
|
|
AWSCore::AWSResourceMappingRequestBus::Handler::BusDisconnect();
|
|
}
|
|
}
|
|
@@ -126,7 +127,7 @@ namespace AWSClientAuthUnitTest
|
|
ON_CALL(*this, GetDefaultConfig).WillByDefault(testing::Return(nullptr));
|
|
ON_CALL(*this, GetDefaultConfig).WillByDefault(testing::Return(nullptr));
|
|
}
|
|
}
|
|
|
|
|
|
- ~AWSCoreRequestBusMock()
|
|
|
|
|
|
+ ~AWSCoreRequestBusMock() override
|
|
{
|
|
{
|
|
AWSCore::AWSCoreRequestBus::Handler::BusDisconnect();
|
|
AWSCore::AWSCoreRequestBus::Handler::BusDisconnect();
|
|
}
|
|
}
|
|
@@ -141,11 +142,12 @@ namespace AWSClientAuthUnitTest
|
|
public:
|
|
public:
|
|
HttpRequestorRequestBusMock()
|
|
HttpRequestorRequestBusMock()
|
|
{
|
|
{
|
|
- ON_CALL(*this, AddRequestWithHeadersAndBody(testing::_, testing::_, testing::_, testing::_, testing::_)).WillByDefault(testing::Invoke(this, &HttpRequestorRequestBusMock::AddRequestWithHeadersAndBodyMock));
|
|
|
|
|
|
+ ON_CALL(*this, AddRequestWithHeadersAndBody(testing::_, testing::_, testing::_, testing::_, testing::_))
|
|
|
|
+ .WillByDefault(testing::Invoke(this, &HttpRequestorRequestBusMock::AddRequestWithHeadersAndBodyMock));
|
|
HttpRequestor::HttpRequestorRequestBus::Handler::BusConnect();
|
|
HttpRequestor::HttpRequestorRequestBus::Handler::BusConnect();
|
|
}
|
|
}
|
|
|
|
|
|
- virtual ~HttpRequestorRequestBusMock()
|
|
|
|
|
|
+ ~HttpRequestorRequestBusMock() override
|
|
{
|
|
{
|
|
HttpRequestor::HttpRequestorRequestBus::Handler::BusDisconnect();
|
|
HttpRequestor::HttpRequestorRequestBus::Handler::BusDisconnect();
|
|
}
|
|
}
|
|
@@ -180,6 +182,7 @@ namespace AWSClientAuthUnitTest
|
|
AZ_UNUSED(headers);
|
|
AZ_UNUSED(headers);
|
|
AZ_UNUSED(callback);
|
|
AZ_UNUSED(callback);
|
|
}
|
|
}
|
|
|
|
+
|
|
void AddRequestWithHeadersAndBodyMock(const AZStd::string& URI, Aws::Http::HttpMethod method, const HttpRequestor::Headers& headers, const AZStd::string& body, const HttpRequestor::Callback& callback)
|
|
void AddRequestWithHeadersAndBodyMock(const AZStd::string& URI, Aws::Http::HttpMethod method, const HttpRequestor::Headers& headers, const AZStd::string& body, const HttpRequestor::Callback& callback)
|
|
{
|
|
{
|
|
AZ_UNUSED(URI);
|
|
AZ_UNUSED(URI);
|
|
@@ -206,6 +209,7 @@ namespace AWSClientAuthUnitTest
|
|
AZ_UNUSED(method);
|
|
AZ_UNUSED(method);
|
|
AZ_UNUSED(callback);
|
|
AZ_UNUSED(callback);
|
|
}
|
|
}
|
|
|
|
+
|
|
void AddTextRequestWithHeaders(const AZStd::string& URI, Aws::Http::HttpMethod method, const HttpRequestor::Headers& headers, const HttpRequestor::TextCallback& callback) override
|
|
void AddTextRequestWithHeaders(const AZStd::string& URI, Aws::Http::HttpMethod method, const HttpRequestor::Headers& headers, const HttpRequestor::TextCallback& callback) override
|
|
{
|
|
{
|
|
AZ_UNUSED(URI);
|
|
AZ_UNUSED(URI);
|
|
@@ -213,6 +217,7 @@ namespace AWSClientAuthUnitTest
|
|
AZ_UNUSED(headers);
|
|
AZ_UNUSED(headers);
|
|
AZ_UNUSED(callback);
|
|
AZ_UNUSED(callback);
|
|
}
|
|
}
|
|
|
|
+
|
|
void AddTextRequestWithHeadersAndBody(const AZStd::string& URI, Aws::Http::HttpMethod method, const HttpRequestor::Headers& headers, const AZStd::string& body, const HttpRequestor::TextCallback& callback) override
|
|
void AddTextRequestWithHeadersAndBody(const AZStd::string& URI, Aws::Http::HttpMethod method, const HttpRequestor::Headers& headers, const AZStd::string& body, const HttpRequestor::TextCallback& callback) override
|
|
{
|
|
{
|
|
AZ_UNUSED(URI);
|
|
AZ_UNUSED(URI);
|
|
@@ -227,8 +232,8 @@ namespace AWSClientAuthUnitTest
|
|
: public Aws::CognitoIdentityProvider::CognitoIdentityProviderClient
|
|
: public Aws::CognitoIdentityProvider::CognitoIdentityProviderClient
|
|
{
|
|
{
|
|
public:
|
|
public:
|
|
-
|
|
|
|
- CognitoIdentityProviderClientMock() : Aws::CognitoIdentityProvider::CognitoIdentityProviderClient(Aws::Auth::AWSCredentials())
|
|
|
|
|
|
+ CognitoIdentityProviderClientMock()
|
|
|
|
+ : Aws::CognitoIdentityProvider::CognitoIdentityProviderClient(Aws::Auth::AWSCredentials())
|
|
{
|
|
{
|
|
ON_CALL(*this, InitiateAuth(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityProviderClientMock::InitiateAuthMock));
|
|
ON_CALL(*this, InitiateAuth(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityProviderClientMock::InitiateAuthMock));
|
|
ON_CALL(*this, SignUp(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityProviderClientMock::SignUpMock));
|
|
ON_CALL(*this, SignUp(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityProviderClientMock::SignUpMock));
|
|
@@ -239,21 +244,27 @@ namespace AWSClientAuthUnitTest
|
|
ON_CALL(*this, SetUserMFAPreference(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityProviderClientMock::SetUserMFAPreferenceMock));
|
|
ON_CALL(*this, SetUserMFAPreference(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityProviderClientMock::SetUserMFAPreferenceMock));
|
|
}
|
|
}
|
|
|
|
|
|
- MOCK_CONST_METHOD1(InitiateAuth
|
|
|
|
- , Aws::CognitoIdentityProvider::Model::InitiateAuthOutcome(const Aws::CognitoIdentityProvider::Model::InitiateAuthRequest& request));
|
|
|
|
- MOCK_CONST_METHOD1(RespondToAuthChallenge
|
|
|
|
- , Aws::CognitoIdentityProvider::Model::RespondToAuthChallengeOutcome(const Aws::CognitoIdentityProvider::Model::RespondToAuthChallengeRequest& request));
|
|
|
|
- MOCK_CONST_METHOD1(SignUp
|
|
|
|
- , Aws::CognitoIdentityProvider::Model::SignUpOutcome(const Aws::CognitoIdentityProvider::Model::SignUpRequest& request));
|
|
|
|
- MOCK_CONST_METHOD1(ConfirmSignUp
|
|
|
|
- , Aws::CognitoIdentityProvider::Model::ConfirmSignUpOutcome(const Aws::CognitoIdentityProvider::Model::ConfirmSignUpRequest& request));
|
|
|
|
- MOCK_CONST_METHOD1(ForgotPassword
|
|
|
|
- , Aws::CognitoIdentityProvider::Model::ForgotPasswordOutcome(const Aws::CognitoIdentityProvider::Model::ForgotPasswordRequest& request));
|
|
|
|
- MOCK_CONST_METHOD1(ConfirmForgotPassword
|
|
|
|
- , Aws::CognitoIdentityProvider::Model::ConfirmForgotPasswordOutcome(const Aws::CognitoIdentityProvider::Model::ConfirmForgotPasswordRequest& request));
|
|
|
|
- MOCK_CONST_METHOD1(SetUserMFAPreference
|
|
|
|
- , Aws::CognitoIdentityProvider::Model::SetUserMFAPreferenceOutcome(const Aws::CognitoIdentityProvider::Model::SetUserMFAPreferenceRequest& request));
|
|
|
|
-
|
|
|
|
|
|
+ MOCK_CONST_METHOD1(
|
|
|
|
+ InitiateAuth,
|
|
|
|
+ Aws::CognitoIdentityProvider::Model::InitiateAuthOutcome(const Aws::CognitoIdentityProvider::Model::InitiateAuthRequest& request));
|
|
|
|
+ MOCK_CONST_METHOD1(
|
|
|
|
+ RespondToAuthChallenge,
|
|
|
|
+ Aws::CognitoIdentityProvider::Model::RespondToAuthChallengeOutcome(const Aws::CognitoIdentityProvider::Model::RespondToAuthChallengeRequest& request));
|
|
|
|
+ MOCK_CONST_METHOD1(
|
|
|
|
+ SignUp,
|
|
|
|
+ Aws::CognitoIdentityProvider::Model::SignUpOutcome(const Aws::CognitoIdentityProvider::Model::SignUpRequest& request));
|
|
|
|
+ MOCK_CONST_METHOD1(
|
|
|
|
+ ConfirmSignUp,
|
|
|
|
+ Aws::CognitoIdentityProvider::Model::ConfirmSignUpOutcome(const Aws::CognitoIdentityProvider::Model::ConfirmSignUpRequest& request));
|
|
|
|
+ MOCK_CONST_METHOD1(
|
|
|
|
+ ForgotPassword,
|
|
|
|
+ Aws::CognitoIdentityProvider::Model::ForgotPasswordOutcome(const Aws::CognitoIdentityProvider::Model::ForgotPasswordRequest& request));
|
|
|
|
+ MOCK_CONST_METHOD1(
|
|
|
|
+ ConfirmForgotPassword,
|
|
|
|
+ Aws::CognitoIdentityProvider::Model::ConfirmForgotPasswordOutcome(const Aws::CognitoIdentityProvider::Model::ConfirmForgotPasswordRequest& request));
|
|
|
|
+ MOCK_CONST_METHOD1(
|
|
|
|
+ SetUserMFAPreference,
|
|
|
|
+ Aws::CognitoIdentityProvider::Model::SetUserMFAPreferenceOutcome(const Aws::CognitoIdentityProvider::Model::SetUserMFAPreferenceRequest& request));
|
|
|
|
|
|
Aws::CognitoIdentityProvider::Model::InitiateAuthOutcome InitiateAuthMock(const Aws::CognitoIdentityProvider::Model::InitiateAuthRequest& request)
|
|
Aws::CognitoIdentityProvider::Model::InitiateAuthOutcome InitiateAuthMock(const Aws::CognitoIdentityProvider::Model::InitiateAuthRequest& request)
|
|
{
|
|
{
|
|
@@ -316,7 +327,7 @@ namespace AWSClientAuthUnitTest
|
|
Aws::CognitoIdentityProvider::Model::ConfirmForgotPasswordOutcome outcome(result);
|
|
Aws::CognitoIdentityProvider::Model::ConfirmForgotPasswordOutcome outcome(result);
|
|
return outcome;
|
|
return outcome;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
Aws::CognitoIdentityProvider::Model::SetUserMFAPreferenceOutcome SetUserMFAPreferenceMock(const Aws::CognitoIdentityProvider::Model::SetUserMFAPreferenceRequest& request)
|
|
Aws::CognitoIdentityProvider::Model::SetUserMFAPreferenceOutcome SetUserMFAPreferenceMock(const Aws::CognitoIdentityProvider::Model::SetUserMFAPreferenceRequest& request)
|
|
{
|
|
{
|
|
AZ_UNUSED(request);
|
|
AZ_UNUSED(request);
|
|
@@ -330,17 +341,17 @@ namespace AWSClientAuthUnitTest
|
|
: public Aws::CognitoIdentity::CognitoIdentityClient
|
|
: public Aws::CognitoIdentity::CognitoIdentityClient
|
|
{
|
|
{
|
|
public:
|
|
public:
|
|
- CognitoIdentityClientMock() : Aws::CognitoIdentity::CognitoIdentityClient(Aws::Auth::AWSCredentials())
|
|
|
|
|
|
+ CognitoIdentityClientMock()
|
|
|
|
+ : Aws::CognitoIdentity::CognitoIdentityClient(Aws::Auth::AWSCredentials())
|
|
{
|
|
{
|
|
ON_CALL(*this, GetId(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityClientMock::GetIdMock));
|
|
ON_CALL(*this, GetId(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityClientMock::GetIdMock));
|
|
ON_CALL(*this, GetCredentialsForIdentity(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityClientMock::GetCredentialsForIdentityMock));
|
|
ON_CALL(*this, GetCredentialsForIdentity(testing::_)).WillByDefault(testing::Invoke(this, &CognitoIdentityClientMock::GetCredentialsForIdentityMock));
|
|
}
|
|
}
|
|
|
|
|
|
- MOCK_CONST_METHOD1(GetId
|
|
|
|
- , Aws::CognitoIdentity::Model::GetIdOutcome(const Aws::CognitoIdentity::Model::GetIdRequest& request));
|
|
|
|
- MOCK_CONST_METHOD1(GetCredentialsForIdentity
|
|
|
|
- , Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome(const Aws::CognitoIdentity::Model::GetCredentialsForIdentityRequest& request));
|
|
|
|
-
|
|
|
|
|
|
+ MOCK_CONST_METHOD1(GetId, Aws::CognitoIdentity::Model::GetIdOutcome(const Aws::CognitoIdentity::Model::GetIdRequest& request));
|
|
|
|
+ MOCK_CONST_METHOD1(
|
|
|
|
+ GetCredentialsForIdentity,
|
|
|
|
+ Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome(const Aws::CognitoIdentity::Model::GetCredentialsForIdentityRequest& request));
|
|
|
|
|
|
Aws::CognitoIdentity::Model::GetIdOutcome GetIdMock(const Aws::CognitoIdentity::Model::GetIdRequest& request)
|
|
Aws::CognitoIdentity::Model::GetIdOutcome GetIdMock(const Aws::CognitoIdentity::Model::GetIdRequest& request)
|
|
{
|
|
{
|
|
@@ -370,13 +381,12 @@ namespace AWSClientAuthUnitTest
|
|
: public AWSClientAuth::AuthenticationProviderInterface
|
|
: public AWSClientAuth::AuthenticationProviderInterface
|
|
{
|
|
{
|
|
public:
|
|
public:
|
|
-
|
|
|
|
AuthenticationProviderMock()
|
|
AuthenticationProviderMock()
|
|
{
|
|
{
|
|
ON_CALL(*this, Initialize()).WillByDefault(testing::Return(true));
|
|
ON_CALL(*this, Initialize()).WillByDefault(testing::Return(true));
|
|
}
|
|
}
|
|
|
|
|
|
- virtual ~AuthenticationProviderMock() = default;
|
|
|
|
|
|
+ ~AuthenticationProviderMock() override = default;
|
|
|
|
|
|
MOCK_METHOD0(Initialize, bool());
|
|
MOCK_METHOD0(Initialize, bool());
|
|
MOCK_METHOD2(PasswordGrantSingleFactorSignInAsync, void(const AZStd::string& username, const AZStd::string& password));
|
|
MOCK_METHOD2(PasswordGrantSingleFactorSignInAsync, void(const AZStd::string& username, const AZStd::string& password));
|
|
@@ -403,7 +413,7 @@ namespace AWSClientAuthUnitTest
|
|
AWSClientAuth::AuthenticationProviderNotificationBus::Handler::BusConnect();
|
|
AWSClientAuth::AuthenticationProviderNotificationBus::Handler::BusConnect();
|
|
}
|
|
}
|
|
|
|
|
|
- virtual ~AuthenticationProviderNotificationsBusMock()
|
|
|
|
|
|
+ ~AuthenticationProviderNotificationsBusMock() override
|
|
{
|
|
{
|
|
AWSClientAuth::AuthenticationProviderNotificationBus::Handler::BusDisconnect();
|
|
AWSClientAuth::AuthenticationProviderNotificationBus::Handler::BusDisconnect();
|
|
}
|
|
}
|
|
@@ -425,19 +435,14 @@ namespace AWSClientAuthUnitTest
|
|
private:
|
|
private:
|
|
void AssertAuthenticationTokensPopulated([[maybe_unused]] const AWSClientAuth::AuthenticationTokens& authenticationToken)
|
|
void AssertAuthenticationTokensPopulated([[maybe_unused]] const AWSClientAuth::AuthenticationTokens& authenticationToken)
|
|
{
|
|
{
|
|
|
|
+ AZ_Assert(authenticationToken.GetAccessToken() == TEST_ACCESS_TOKEN, "Access token expected to match");
|
|
AZ_Assert(
|
|
AZ_Assert(
|
|
- authenticationToken.GetAccessToken() == TEST_ACCESS_TOKEN,
|
|
|
|
- "Access token expected to match");
|
|
|
|
- AZ_Assert(
|
|
|
|
- authenticationToken.GetProviderName() == AWSClientAuth::ProviderNameEnum::LoginWithAmazon ?
|
|
|
|
- authenticationToken.GetOpenIdToken() == TEST_ACCESS_TOKEN : authenticationToken.GetOpenIdToken() == TEST_ID_TOKEN,
|
|
|
|
|
|
+ authenticationToken.GetProviderName() == AWSClientAuth::ProviderNameEnum::LoginWithAmazon
|
|
|
|
+ ? authenticationToken.GetOpenIdToken() == TEST_ACCESS_TOKEN
|
|
|
|
+ : authenticationToken.GetOpenIdToken() == TEST_ID_TOKEN,
|
|
"Id token expected to match");
|
|
"Id token expected to match");
|
|
- AZ_Assert(
|
|
|
|
- authenticationToken.GetRefreshToken() == TEST_REFRESH_TOKEN,
|
|
|
|
- "Refresh token expected match");
|
|
|
|
- AZ_Assert(
|
|
|
|
- authenticationToken.GetTokensExpireTimeSeconds() != 0,
|
|
|
|
- "Access token expiry expected to be set");
|
|
|
|
|
|
+ AZ_Assert(authenticationToken.GetRefreshToken() == TEST_REFRESH_TOKEN, "Refresh token expected match");
|
|
|
|
+ AZ_Assert(authenticationToken.GetTokensExpireTimeSeconds() != 0, "Access token expiry expected to be set");
|
|
AZ_Assert(authenticationToken.AreTokensValid(), "Tokens expected to be valid");
|
|
AZ_Assert(authenticationToken.AreTokensValid(), "Tokens expected to be valid");
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -451,7 +456,7 @@ namespace AWSClientAuthUnitTest
|
|
AWSClientAuth::AWSCognitoAuthorizationNotificationBus::Handler::BusConnect();
|
|
AWSClientAuth::AWSCognitoAuthorizationNotificationBus::Handler::BusConnect();
|
|
}
|
|
}
|
|
|
|
|
|
- virtual ~AWSCognitoAuthorizationNotificationsBusMock()
|
|
|
|
|
|
+ ~AWSCognitoAuthorizationNotificationsBusMock() override
|
|
{
|
|
{
|
|
AWSClientAuth::AWSCognitoAuthorizationNotificationBus::Handler::BusDisconnect();
|
|
AWSClientAuth::AWSCognitoAuthorizationNotificationBus::Handler::BusDisconnect();
|
|
}
|
|
}
|
|
@@ -469,7 +474,7 @@ namespace AWSClientAuthUnitTest
|
|
AWSClientAuth::AWSCognitoUserManagementNotificationBus::Handler::BusConnect();
|
|
AWSClientAuth::AWSCognitoUserManagementNotificationBus::Handler::BusConnect();
|
|
}
|
|
}
|
|
|
|
|
|
- virtual ~AWSCognitoUserManagementNotificationsBusMock()
|
|
|
|
|
|
+ ~AWSCognitoUserManagementNotificationsBusMock() override
|
|
{
|
|
{
|
|
AWSClientAuth::AWSCognitoUserManagementNotificationBus::Handler::BusDisconnect();
|
|
AWSClientAuth::AWSCognitoUserManagementNotificationBus::Handler::BusDisconnect();
|
|
}
|
|
}
|
|
@@ -494,10 +499,8 @@ namespace AWSClientAuthUnitTest
|
|
, public AWSClientAuth::AWSClientAuthRequestBus::Handler
|
|
, public AWSClientAuth::AWSClientAuthRequestBus::Handler
|
|
{
|
|
{
|
|
public:
|
|
public:
|
|
-
|
|
|
|
AWSClientAuthGemAllocatorFixture()
|
|
AWSClientAuthGemAllocatorFixture()
|
|
{
|
|
{
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
AWSClientAuthGemAllocatorFixture(bool connectClientAuthBus)
|
|
AWSClientAuthGemAllocatorFixture(bool connectClientAuthBus)
|
|
@@ -505,7 +508,7 @@ namespace AWSClientAuthUnitTest
|
|
m_connectClientAuthBus = connectClientAuthBus;
|
|
m_connectClientAuthBus = connectClientAuthBus;
|
|
}
|
|
}
|
|
|
|
|
|
- virtual ~AWSClientAuthGemAllocatorFixture() = default;
|
|
|
|
|
|
+ ~AWSClientAuthGemAllocatorFixture() override = default;
|
|
|
|
|
|
protected:
|
|
protected:
|
|
AZStd::shared_ptr<AZ::SerializeContext> m_serializeContext;
|
|
AZStd::shared_ptr<AZ::SerializeContext> m_serializeContext;
|
|
@@ -524,6 +527,7 @@ namespace AWSClientAuthUnitTest
|
|
AuthenticationProviderNotificationsBusMock m_authenticationProviderNotificationsBusMock;
|
|
AuthenticationProviderNotificationsBusMock m_authenticationProviderNotificationsBusMock;
|
|
AWSCognitoAuthorizationNotificationsBusMock m_awsCognitoAuthorizationNotificationsBusMock;
|
|
AWSCognitoAuthorizationNotificationsBusMock m_awsCognitoAuthorizationNotificationsBusMock;
|
|
AWSCognitoUserManagementNotificationsBusMock m_awsCognitoUserManagementNotificationsBusMock;
|
|
AWSCognitoUserManagementNotificationsBusMock m_awsCognitoUserManagementNotificationsBusMock;
|
|
|
|
+ bool m_hasCognitoControllers = true;
|
|
|
|
|
|
void SetUp() override
|
|
void SetUp() override
|
|
{
|
|
{
|
|
@@ -609,31 +613,91 @@ namespace AWSClientAuthUnitTest
|
|
m_serializeContext.reset();
|
|
m_serializeContext.reset();
|
|
m_registrationContext.reset();
|
|
m_registrationContext.reset();
|
|
|
|
|
|
-
|
|
|
|
delete AZ::IO::FileIOBase::GetInstance();
|
|
delete AZ::IO::FileIOBase::GetInstance();
|
|
AZ::IO::FileIOBase::SetInstance(nullptr);
|
|
AZ::IO::FileIOBase::SetInstance(nullptr);
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// ComponentApplicationBus overrides. Required by settings registry for json serialization context.
|
|
// ComponentApplicationBus overrides. Required by settings registry for json serialization context.
|
|
- AZ::ComponentApplication* GetApplication() override { return nullptr; }
|
|
|
|
- void RegisterComponentDescriptor(const AZ::ComponentDescriptor*) override { }
|
|
|
|
- void UnregisterComponentDescriptor(const AZ::ComponentDescriptor*) override { }
|
|
|
|
- void RegisterEntityAddedEventHandler(AZ::EntityAddedEvent::Handler&) override { }
|
|
|
|
- void RegisterEntityRemovedEventHandler(AZ::EntityRemovedEvent::Handler&) override { }
|
|
|
|
- void RegisterEntityActivatedEventHandler(AZ::EntityActivatedEvent::Handler&) override { }
|
|
|
|
- void RegisterEntityDeactivatedEventHandler(AZ::EntityDeactivatedEvent::Handler&) override { }
|
|
|
|
- void SignalEntityActivated(AZ::Entity*) override { }
|
|
|
|
- void SignalEntityDeactivated(AZ::Entity*) override { }
|
|
|
|
- bool AddEntity(AZ::Entity*) override { return true; }
|
|
|
|
- bool RemoveEntity(AZ::Entity*) override { return true; }
|
|
|
|
- bool DeleteEntity(const AZ::EntityId&) override { return true; }
|
|
|
|
- AZ::Entity* FindEntity(const AZ::EntityId&) override { return nullptr; }
|
|
|
|
- AZ::BehaviorContext* GetBehaviorContext() override { return nullptr; }
|
|
|
|
- const char* GetExecutableFolder() const override { return nullptr; }
|
|
|
|
- const char* GetEngineRoot() const override { return nullptr; }
|
|
|
|
- void EnumerateEntities(const EntityCallback& /*callback*/) override {}
|
|
|
|
- void QueryApplicationType(AZ::ApplicationTypeQuery& /*appType*/) const override {}
|
|
|
|
|
|
+ AZ::ComponentApplication* GetApplication() override
|
|
|
|
+ {
|
|
|
|
+ return nullptr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void RegisterComponentDescriptor(const AZ::ComponentDescriptor*) override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void UnregisterComponentDescriptor(const AZ::ComponentDescriptor*) override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void RegisterEntityAddedEventHandler(AZ::EntityAddedEvent::Handler&) override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void RegisterEntityRemovedEventHandler(AZ::EntityRemovedEvent::Handler&) override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void RegisterEntityActivatedEventHandler(AZ::EntityActivatedEvent::Handler&) override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void RegisterEntityDeactivatedEventHandler(AZ::EntityDeactivatedEvent::Handler&) override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void SignalEntityActivated(AZ::Entity*) override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void SignalEntityDeactivated(AZ::Entity*) override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ bool AddEntity(AZ::Entity*) override
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ bool RemoveEntity(AZ::Entity*) override
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ bool DeleteEntity(const AZ::EntityId&) override
|
|
|
|
+ {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ AZ::Entity* FindEntity(const AZ::EntityId&) override
|
|
|
|
+ {
|
|
|
|
+ return nullptr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ AZ::BehaviorContext* GetBehaviorContext() override
|
|
|
|
+ {
|
|
|
|
+ return nullptr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const char* GetExecutableFolder() const override
|
|
|
|
+ {
|
|
|
|
+ return nullptr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const char* GetEngineRoot() const override
|
|
|
|
+ {
|
|
|
|
+ return nullptr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void EnumerateEntities(const EntityCallback& /*callback*/) override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ void QueryApplicationType(AZ::ApplicationTypeQuery& /*appType*/) const override
|
|
|
|
+ {
|
|
|
|
+ }
|
|
|
|
+
|
|
AZ::SerializeContext* GetSerializeContext() override
|
|
AZ::SerializeContext* GetSerializeContext() override
|
|
{
|
|
{
|
|
return m_serializeContext.get();
|
|
return m_serializeContext.get();
|
|
@@ -655,6 +719,11 @@ namespace AWSClientAuthUnitTest
|
|
return m_cognitoIdentityClientMock;
|
|
return m_cognitoIdentityClientMock;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ bool HasCognitoControllers() const override
|
|
|
|
+ {
|
|
|
|
+ return m_hasCognitoControllers;
|
|
|
|
+ }
|
|
|
|
+
|
|
// TODO Add safety check. Also use pattern to create and remove one file.
|
|
// TODO Add safety check. Also use pattern to create and remove one file.
|
|
static void DeleteFolderRecursive(const AZStd::string& path)
|
|
static void DeleteFolderRecursive(const AZStd::string& path)
|
|
{
|
|
{
|
|
@@ -707,5 +776,5 @@ namespace AWSClientAuthUnitTest
|
|
m_testFolderCreated = true;
|
|
m_testFolderCreated = true;
|
|
return path;
|
|
return path;
|
|
}
|
|
}
|
|
- };
|
|
|
|
-}
|
|
|
|
|
|
+ };
|
|
|
|
+} // namespace AWSClientAuthUnitTest
|