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