diff options
author | msherbakov <msherbakov@yandex-team.ru> | 2022-02-10 16:49:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:17 +0300 |
commit | a0ffafe83b7d6229709a32fa942c71d672ac989c (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/monlib/encode/format_ut.cpp | |
parent | c224a621661ddd69699f9476922eb316607ef57e (diff) | |
download | ydb-a0ffafe83b7d6229709a32fa942c71d672ac989c.tar.gz |
Restoring authorship annotation for <msherbakov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/monlib/encode/format_ut.cpp')
-rw-r--r-- | library/cpp/monlib/encode/format_ut.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/library/cpp/monlib/encode/format_ut.cpp b/library/cpp/monlib/encode/format_ut.cpp index f92f886c31..22a0e30c03 100644 --- a/library/cpp/monlib/encode/format_ut.cpp +++ b/library/cpp/monlib/encode/format_ut.cpp @@ -10,32 +10,32 @@ using namespace NMonitoring; Y_UNIT_TEST_SUITE(TFormatTest) { - Y_UNIT_TEST(ContentTypeHeader) { - UNIT_ASSERT_EQUAL(FormatFromContentType(""), EFormat::UNKNOWN); - UNIT_ASSERT_EQUAL(FormatFromContentType("application/json;some=stuff"), EFormat::JSON); - UNIT_ASSERT_EQUAL(FormatFromContentType("application/x-solomon-spack"), EFormat::SPACK); - UNIT_ASSERT_EQUAL(FormatFromContentType("application/xml"), EFormat::UNKNOWN); - UNIT_ASSERT_EQUAL(FormatFromContentType(";application/xml"), EFormat::UNKNOWN); - } - + Y_UNIT_TEST(ContentTypeHeader) { + UNIT_ASSERT_EQUAL(FormatFromContentType(""), EFormat::UNKNOWN); + UNIT_ASSERT_EQUAL(FormatFromContentType("application/json;some=stuff"), EFormat::JSON); + UNIT_ASSERT_EQUAL(FormatFromContentType("application/x-solomon-spack"), EFormat::SPACK); + UNIT_ASSERT_EQUAL(FormatFromContentType("application/xml"), EFormat::UNKNOWN); + UNIT_ASSERT_EQUAL(FormatFromContentType(";application/xml"), EFormat::UNKNOWN); + } + Y_UNIT_TEST(AcceptHeader) { - UNIT_ASSERT_EQUAL(FormatFromAcceptHeader(""), EFormat::UNKNOWN); - UNIT_ASSERT_EQUAL(FormatFromAcceptHeader("*/*"), EFormat::UNKNOWN); + UNIT_ASSERT_EQUAL(FormatFromAcceptHeader(""), EFormat::UNKNOWN); + UNIT_ASSERT_EQUAL(FormatFromAcceptHeader("*/*"), EFormat::UNKNOWN); UNIT_ASSERT_EQUAL( - FormatFromAcceptHeader("application/xml"), + FormatFromAcceptHeader("application/xml"), EFormat::UNKNOWN); UNIT_ASSERT_EQUAL( - FormatFromAcceptHeader("application/json"), + FormatFromAcceptHeader("application/json"), EFormat::JSON); UNIT_ASSERT_EQUAL( - FormatFromAcceptHeader("application/x-solomon-spack"), + FormatFromAcceptHeader("application/x-solomon-spack"), EFormat::SPACK); UNIT_ASSERT_EQUAL( - FormatFromAcceptHeader("application/x-solomon-pb"), + FormatFromAcceptHeader("application/x-solomon-pb"), EFormat::PROTOBUF); UNIT_ASSERT_EQUAL( @@ -43,19 +43,19 @@ Y_UNIT_TEST_SUITE(TFormatTest) { EFormat::TEXT); UNIT_ASSERT_EQUAL( - FormatFromAcceptHeader("application/json, text/plain"), + FormatFromAcceptHeader("application/json, text/plain"), EFormat::JSON); UNIT_ASSERT_EQUAL( - FormatFromAcceptHeader("application/x-solomon-spack, application/json, text/plain"), + FormatFromAcceptHeader("application/x-solomon-spack, application/json, text/plain"), EFormat::SPACK); UNIT_ASSERT_EQUAL( - FormatFromAcceptHeader(" , application/x-solomon-spack ,, application/json , text/plain"), + FormatFromAcceptHeader(" , application/x-solomon-spack ,, application/json , text/plain"), EFormat::SPACK); UNIT_ASSERT_EQUAL( - FormatFromAcceptHeader("application/xml, application/x-solomon-spack, text/plain"), + FormatFromAcceptHeader("application/xml, application/x-solomon-spack, text/plain"), EFormat::SPACK); UNIT_ASSERT_EQUAL( |