]>
Commit | Line | Data |
---|---|---|
1e59de90 TL |
1 | // Copyright The OpenTelemetry Authors |
2 | // SPDX-License-Identifier: Apache-2.0 | |
3 | ||
4 | #include "opentelemetry/nostd/string_view.h" | |
5 | #include "opentelemetry/sdk/instrumentationlibrary/instrumentation_library.h" | |
6 | ||
7 | #include <gtest/gtest.h> | |
8 | #include <string> | |
9 | #include <vector> | |
10 | ||
11 | using namespace opentelemetry; | |
12 | using namespace opentelemetry::sdk::instrumentationlibrary; | |
13 | ||
14 | TEST(InstrumentationLibrary, CreateInstrumentationLibrary) | |
15 | { | |
16 | ||
17 | std::string library_name = "opentelemetry-cpp"; | |
18 | std::string library_version = "0.1.0"; | |
19 | std::string schema_url = "https://opentelemetry.io/schemas/1.2.0"; | |
20 | auto instrumentation_library = | |
21 | InstrumentationLibrary::Create(library_name, library_version, schema_url); | |
22 | ||
23 | EXPECT_EQ(instrumentation_library->GetName(), library_name); | |
24 | EXPECT_EQ(instrumentation_library->GetVersion(), library_version); | |
25 | EXPECT_EQ(instrumentation_library->GetSchemaURL(), schema_url); | |
26 | } |