blob: 6366ebfcec0e00c1d19786071156057b789e5923 (
plain) (
blame)
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
27
28
29
30
31
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/searchcore/proton/reference/i_document_db_reference.h>
#include <vespa/searchcore/proton/reference/gid_to_lid_change_registrator.h>
namespace search::attribute { class ReadableAttributeVector; }
namespace search { class IGidToLidMapperFactory; }
namespace proton::test {
/**
* Mock of the IDocumentDBReference interface used for unit testing.
*/
struct MockDocumentDBReference : public IDocumentDBReference {
using SP = std::shared_ptr<MockDocumentDBReference>;
virtual std::shared_ptr<search::attribute::ReadableAttributeVector> getAttribute(vespalib::stringref) override {
return std::shared_ptr<search::attribute::ReadableAttributeVector>();
}
virtual std::shared_ptr<const search::IDocumentMetaStoreContext> getDocumentMetaStore() const override {
return std::shared_ptr<const search::IDocumentMetaStoreContext>();
}
virtual std::shared_ptr<search::IGidToLidMapperFactory> getGidToLidMapperFactory() override {
return std::shared_ptr<search::IGidToLidMapperFactory>();
}
virtual std::unique_ptr<GidToLidChangeRegistrator> makeGidToLidChangeRegistrator(const vespalib::string &) override {
return std::unique_ptr<GidToLidChangeRegistrator>();
}
};
}
|