Skip to content
Merged
6 changes: 0 additions & 6 deletions test/BUILD
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
cc_test(
name = "resolution_details_test",
# Path is relative to cpp-sdk/src/test/
srcs = ["resolution_details_test.cpp"],
deps = [
# We reference the library defined in the parent 'src' package
"//src:resolution_details",
# Google Test dependency remains the same
"@googletest//:gtest_main",
],
)

cc_test(
name = "noop_provider_test",
# Path is relative to cpp-sdk/src/test/
srcs = ["noop_provider_test.cpp"],
deps = [
# We reference the library defined in the parent 'src' package
"//src:noop_provider",
# Google Test dependency remains the same
"@googletest//:gtest_main",
],
)
12 changes: 6 additions & 6 deletions test/noop_provider_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ using namespace openfeature;

class NoopProviderTest : public ::testing::Test {
protected:
NoopProvider provider;
EvaluationContext ctx;
NoopProvider provider_;
EvaluationContext ctx_;
};

// Test to verify the metadata returned by the provider.
TEST_F(NoopProviderTest, ShouldReturnProviderNameForMetadata) {
const Metadata metadata = provider.GetMetadata();
const Metadata metadata = provider_.GetMetadata();
EXPECT_EQ(metadata.name, "Noop Provider");
}

// Test to verify the Init method returns an OK status.
TEST_F(NoopProviderTest, InitShouldReturnOkStatus) {
const absl::Status status = provider.Init(ctx);
const absl::Status status = provider_.Init(ctx_);
EXPECT_EQ(status, absl::OkStatus());
}

// Test to verify the Shutdown method returns an OK status.
TEST_F(NoopProviderTest, ShutdownShouldReturnOkStatus) {
const absl::Status status = provider.Shutdown();
const absl::Status status = provider_.Shutdown();
EXPECT_EQ(status, absl::OkStatus());
}

Expand All @@ -38,7 +38,7 @@ TEST_P(NoopProviderBooleanTest, BooleanEvaluationShouldReturnDefaultValue) {
const bool defaultValue = GetParam();

const std::unique_ptr<BoolResolutionDetails> details =
provider.GetBooleanEvaluation("my-bool-flag", defaultValue, ctx);
provider_.GetBooleanEvaluation("my-bool-flag", defaultValue, ctx_);

EXPECT_EQ(details->GetValue(), defaultValue);
EXPECT_EQ(details->GetReason(), Reason::kDefault);
Expand Down