#pragma once
#include <myapp/async/pipe.h>

class pipe_mock : public myapp::async::pipe
{
public:
    MOCK_METHOD0(accept, std::unique_ptr<pipe>());
    MOCK_METHOD1(bind, void(std::string));
    MOCK_METHOD2(connect, void(std::string, std::function<void()>));
    MOCK_METHOD2(listen, void(int, std::function<void()>));

    MOCK_METHOD0(connect, void());
    MOCK_METHOD0(listen, void());
    MOCK_METHOD1(open, void(int));
    MOCK_METHOD0(close, void());

    MOCK_METHOD1(shutdown, void(std::function<void()>));
    MOCK_METHOD2(write, void(std::string, std::function<void()>));
    MOCK_METHOD2(read, void(std::function<void(std::string)> data, std::function<void()> end));
    MOCK_METHOD0(stop_read, void());

    MOCK_METHOD1(on_error, void(std::function<void( std::function<void()> )>));
};
