1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_MOCK_CATEGORY_RANKER_H_
6 #define COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_MOCK_CATEGORY_RANKER_H_
7 
8 #include "base/time/time.h"
9 #include "components/ntp_snippets/category.h"
10 #include "components/ntp_snippets/category_rankers/category_ranker.h"
11 #include "testing/gmock/include/gmock/gmock.h"
12 
13 namespace ntp_snippets {
14 
15 class MockCategoryRanker : public CategoryRanker {
16  public:
17   MockCategoryRanker();
18   ~MockCategoryRanker() override;
19 
20   MOCK_CONST_METHOD2(Compare, bool(Category left, Category right));
21   MOCK_METHOD2(ClearHistory, void(base::Time begin, base::Time end));
22   MOCK_METHOD1(AppendCategoryIfNecessary, void(Category category));
23   MOCK_METHOD2(InsertCategoryBeforeIfNecessary,
24                void(Category category_to_insert, Category anchor));
25   MOCK_METHOD2(InsertCategoryAfterIfNecessary,
26                void(Category category_to_insert, Category anchor));
27   MOCK_METHOD0(GetDebugData, std::vector<CategoryRanker::DebugDataItem>());
28   MOCK_METHOD1(OnSuggestionOpened, void(Category category));
29   MOCK_METHOD1(OnCategoryDismissed, void(Category Category));
30 };
31 
32 }  // namespace ntp_snippets
33 
34 #endif  // COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_MOCK_CATEGORY_RANKER_H_
35