// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once /* Include most of the stuff that we might need */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace juniper { class TestEnv { public: TestEnv(int argc, char **argv, const char* propfile); virtual ~TestEnv(); void Usage(char* s); private: std::unique_ptr _props; std::unique_ptr _config; std::unique_ptr _juniper; Fast_NormalizeWordFolder _wordFolder; TestEnv(const TestEnv&); TestEnv& operator=(const TestEnv&); }; class TestQuery { public: TestQuery(const char* qexp, const char* options = NULL); QueryParser _qparser; QueryHandle _qhandle; }; class PropertyMap : public IJuniperProperties { private: std::map _map; public: PropertyMap(); ~PropertyMap(); PropertyMap &set(const char *name, const char *value); const char* GetProperty(const char* name, const char* def = NULL) override; }; extern Config* TestConfig; extern Juniper * _Juniper; } // end namespace juniper typedef juniper::TestQuery TestQuery;