diff options
author | evelkin <evelkin@yandex-team.ru> | 2022-02-10 16:49:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:25 +0300 |
commit | f9f914a9d510572fa0d68959aaea41be5839ff3d (patch) | |
tree | a9fbf49df619eef57f022218df3a1962d611cacf /library/cpp/object_factory/object_factory_ut.cpp | |
parent | 1e0b5488cdce503f4d970e8163823bba9126aedc (diff) | |
download | ydb-f9f914a9d510572fa0d68959aaea41be5839ff3d.tar.gz |
Restoring authorship annotation for <evelkin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/object_factory/object_factory_ut.cpp')
-rw-r--r-- | library/cpp/object_factory/object_factory_ut.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/library/cpp/object_factory/object_factory_ut.cpp b/library/cpp/object_factory/object_factory_ut.cpp index 06fb0739ff..5bb2b75bf2 100644 --- a/library/cpp/object_factory/object_factory_ut.cpp +++ b/library/cpp/object_factory/object_factory_ut.cpp @@ -123,25 +123,25 @@ using TMoveableOnly2Factory = TParametrizedObjectFactory<IMoveableOnlyInterface, static TMoveableOnly2Factory::TRegistrator<TMoveableOnly2> MoveableOnly2Reg("move2"); -class TDirectOrderDifferentSignature : public TDirectOrder { -public: - TDirectOrderDifferentSignature(const TString& provider, TArgument& argument) : - TDirectOrder(provider, 0.01f, argument) - { - } - -}; - -struct TDirectOrderDSCreator: public IFactoryObjectCreator<ICommonInterface, const TString&, float, TArgument&> { - ICommonInterface* Create(const TString& provider, float factor, TArgument& argument) const override { - Y_UNUSED(factor); - return new TDirectOrderDifferentSignature(provider, argument); - } -}; - - -static TTestFactory::TRegistrator<TDirectOrderDifferentSignature> DirectDs("direct_ds", new TDirectOrderDSCreator); - +class TDirectOrderDifferentSignature : public TDirectOrder { +public: + TDirectOrderDifferentSignature(const TString& provider, TArgument& argument) : + TDirectOrder(provider, 0.01f, argument) + { + } + +}; + +struct TDirectOrderDSCreator: public IFactoryObjectCreator<ICommonInterface, const TString&, float, TArgument&> { + ICommonInterface* Create(const TString& provider, float factor, TArgument& argument) const override { + Y_UNUSED(factor); + return new TDirectOrderDifferentSignature(provider, argument); + } +}; + + +static TTestFactory::TRegistrator<TDirectOrderDifferentSignature> DirectDs("direct_ds", new TDirectOrderDSCreator); + Y_UNIT_TEST_SUITE(TestObjectFactory) { Y_UNIT_TEST(TestParametrized) { TArgument directArg{"Name", nullptr}; @@ -177,13 +177,13 @@ Y_UNIT_TEST_SUITE(TestObjectFactory) { UNIT_ASSERT(moveableOnly2->GetValue() == "value2"); } - - Y_UNIT_TEST(TestDifferentSignature) { - TArgument directArg{"Name", nullptr}; - THolder<ICommonInterface> directDs(TTestFactory::Construct("direct_ds", "prov", 0.42, directArg)); - - UNIT_ASSERT(!!directDs); - - UNIT_ASSERT_EQUAL(directDs->GetValue(), "prov0.01Name"); - } + + Y_UNIT_TEST(TestDifferentSignature) { + TArgument directArg{"Name", nullptr}; + THolder<ICommonInterface> directDs(TTestFactory::Construct("direct_ds", "prov", 0.42, directArg)); + + UNIT_ASSERT(!!directDs); + + UNIT_ASSERT_EQUAL(directDs->GetValue(), "prov0.01Name"); + } } |