-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test(manage): Unit test setup * test(manage): Advertising events unit tests * test(manage): AudioDescription events unit tests * test(manage): ClosedCaption events unit tests * test(manage): Device events unit tests * test(manage): Discovery events unit tests * test(manage): HdmiInput events unit tests * test(manage): Localization events unit tests * test(manage): Privacy events unit tests * test(manage): VoiceGuidance events unit tests --------- Co-authored-by: kschrief <[email protected]>
- Loading branch information
1 parent
09b756b
commit eb10d13
Showing
12 changed files
with
1,162 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include "gtest/gtest.h" | ||
#include "ManageSDKTest.h" | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
std::string url = "ws://localhost:9998"; | ||
ManageSDKTest::CreateFireboltInstance(url); | ||
::testing::InitGoogleTest(&argc, argv); | ||
return RUN_ALL_TESTS(); | ||
} |
34 changes: 34 additions & 0 deletions
34
src/sdks/manage/src/cpp/sdk/cpptest/unit/advertisingTest.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include "unit.h" | ||
|
||
class AdvertisingTest : public ::testing::Test | ||
{ | ||
protected: | ||
Firebolt::Error error = Firebolt::Error::None; | ||
}; | ||
|
||
|
||
struct SkipRestrictionChanged : public Firebolt::Advertising::IAdvertising::IOnSkipRestrictionChangedNotification | ||
{ | ||
void onSkipRestrictionChanged( const Firebolt::Advertising::SkipRestriction& ) override; | ||
}; | ||
|
||
Firebolt::Advertising::SkipRestriction newSkipRestriction; | ||
void SkipRestrictionChanged::onSkipRestrictionChanged(const Firebolt::Advertising::SkipRestriction& skipRestriction) | ||
{ | ||
std::cout << "onSkipRestrictionChanged event fired"; | ||
} | ||
|
||
|
||
TEST_F(AdvertisingTest, subscribeOnSkipRestrictionChanged) | ||
{ | ||
SkipRestrictionChanged skipRestrictionChanged; | ||
Firebolt::IFireboltAccessor::Instance().AdvertisingInterface().subscribe(skipRestrictionChanged, &error); | ||
EXPECT_EQ(error, Firebolt::Error::None) << "Error in subscribing to SkipRestrictionChanged"; | ||
} | ||
|
||
TEST_F(AdvertisingTest, unsubscribeOnSkipRestrictionChanged) | ||
{ | ||
SkipRestrictionChanged skipRestrictionChanged; | ||
Firebolt::IFireboltAccessor::Instance().AdvertisingInterface().unsubscribe(skipRestrictionChanged, &error); | ||
EXPECT_EQ(error, Firebolt::Error::None) << "Error in unsubscribing to SkipRestrictionChanged"; | ||
} |
34 changes: 34 additions & 0 deletions
34
src/sdks/manage/src/cpp/sdk/cpptest/unit/audioDescriptionsTest.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include "unit.h" | ||
|
||
class AudioDescriptionsTest : public ::testing::Test | ||
{ | ||
protected: | ||
Firebolt::Error error = Firebolt::Error::None; | ||
}; | ||
|
||
|
||
struct EnabledChanged : public Firebolt::AudioDescriptions::IAudioDescriptions::IOnEnabledChangedNotification | ||
{ | ||
void onEnabledChanged( const bool ) override; | ||
}; | ||
|
||
|
||
void EnabledChanged::onEnabledChanged(const bool) | ||
{ | ||
std::cout << "onAudioDescriptionEnabledChanged event fired"; | ||
} | ||
|
||
|
||
TEST_F(AudioDescriptionsTest, subscribeonEnabledChanged) | ||
{ | ||
EnabledChanged enabledChanged; | ||
Firebolt::IFireboltAccessor::Instance().AudioDescriptionsInterface().subscribe(enabledChanged, &error); | ||
EXPECT_EQ(error, Firebolt::Error::None) << "Error in subscribing to EnabledChanged"; | ||
} | ||
|
||
TEST_F(AudioDescriptionsTest, unsubscribeonEnabledChanged) | ||
{ | ||
EnabledChanged enabledChanged; | ||
Firebolt::IFireboltAccessor::Instance().AudioDescriptionsInterface().unsubscribe(enabledChanged, &error); | ||
EXPECT_EQ(error, Firebolt::Error::None) << "Error in unsubscribing to EnabledChanged"; | ||
} |
Oops, something went wrong.