Commit 10b9b262ca3bb8a7cddefb5cd146394ad37ccdc5

Authored by Jojo-1000
Committed by Moritz Wirger
1 parent 05df0146

Change mock of LinHttpHandler to mock of BaseHttpHandler.

Test also works on windows now.
hueplusplus/test/mocks/mock_LinHttpHandler.h renamed to hueplusplus/test/mocks/mock_BaseHttpHandler.h 100755 → 100644
1   -/**
2   - \file mock_LinHttpHandler.h
3   - Copyright Notice\n
4   - Copyright (C) 2017 Jan Rogall - developer\n
5   - Copyright (C) 2017 Moritz Wirger - developer\n
6   -
7   - This program is free software; you can redistribute it and/or modify
8   - it under the terms of the GNU General Public License as published by
9   - the Free Software Foundation; either version 3 of the License, or
10   - (at your option) any later version.
11   - This program is distributed in the hope that it will be useful,
12   - but WITHOUT ANY WARRANTY; without even the implied warranty of
13   - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14   - GNU General Public License for more details.
15   - You should have received a copy of the GNU General Public License
16   - along with this program; if not, write to the Free Software Foundation,
17   - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18   -**/
19   -
20   -#ifndef _MOCK_LIN_HTTPHANDLER_H
21   -#define _MOCK_LIN_HTTPHANDLER_H
22   -
23   -#include <string>
24   -#include <vector>
25   -
26   -#include <gmock/gmock.h>
27   -
28   -#include "../hueplusplus/include/LinHttpHandler.h"
29   -#include "../hueplusplus/include/json/json.h"
30   -
31   -//! Mock Class
32   -class MockLinHttpHandler : public LinHttpHandler
33   -{
34   -public:
35   - MOCK_CONST_METHOD3( send, std::string(const std::string &msg, const std::string &adr, int port) );
36   -
37   - MOCK_CONST_METHOD4( sendMulticast, std::vector<std::string>(const std::string &msg, const std::string &adr, int port, int timeout) );
38   -};
39   -
40   -#endif
  1 +/**
  2 + \file mock_LinHttpHandler.h
  3 + Copyright Notice\n
  4 + Copyright (C) 2017 Jan Rogall - developer\n
  5 + Copyright (C) 2017 Moritz Wirger - developer\n
  6 +
  7 + This program is free software; you can redistribute it and/or modify
  8 + it under the terms of the GNU General Public License as published by
  9 + the Free Software Foundation; either version 3 of the License, or
  10 + (at your option) any later version.
  11 + This program is distributed in the hope that it will be useful,
  12 + but WITHOUT ANY WARRANTY; without even the implied warranty of
  13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14 + GNU General Public License for more details.
  15 + You should have received a copy of the GNU General Public License
  16 + along with this program; if not, write to the Free Software Foundation,
  17 + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18 +**/
  19 +
  20 +#ifndef _MOCK_LIN_HTTPHANDLER_H
  21 +#define _MOCK_LIN_HTTPHANDLER_H
  22 +
  23 +#include <string>
  24 +#include <vector>
  25 +
  26 +#include <gmock/gmock.h>
  27 +
  28 +#include "../hueplusplus/include/BaseHttpHandler.h"
  29 +#include "../hueplusplus/include/json/json.h"
  30 +
  31 +//! Mock Class
  32 +class MockBaseHttpHandler : public BaseHttpHandler
  33 +{
  34 +public:
  35 + MOCK_CONST_METHOD3( send, std::string(const std::string &msg, const std::string &adr, int port) );
  36 +
  37 + MOCK_CONST_METHOD4( sendMulticast, std::vector<std::string>(const std::string &msg, const std::string &adr, int port, int timeout) );
  38 +};
  39 +
  40 +#endif
... ...