#include #include namespace { class TestComponent : public Ndk::Component { public: TestComponent(int value) : m_value(value) { } int GetValue() const { return m_value; } int m_value; static Ndk::ComponentIndex componentIndex; }; Ndk::ComponentIndex TestComponent::componentIndex; } SCENARIO("Component", "[NDK][COMPONENT]") { GIVEN("Our TestComponent") { TestComponent testComponent(42); WHEN("We clone it") { std::unique_ptr clone = testComponent.Clone(); THEN("We should get a copy") { REQUIRE(static_cast(clone.get())->GetValue() == 42); } } } }