Exemple #1
0
 public void SetUp()
 {
     _data   = null;
     _action = null;
     _t      = new Netomity.Interfaces.Basic.Fakes.StubBasicInterface()
     {
         SendString        = (data) => { _data = data; },
         DataReceivedEvent = (ev) => { _t._DataReceived(ev); },
     };
     _ha = new Netomity.Interfaces.HA.Fakes.StubHAInterface(iface: _t)
     {
         CommandCommand = (command) => { _command = command; return(new Task <bool>(() => { return true; })); },
         OnCommandStringActionOfCommand = (address, action) => {
             _action = action;
         }
     };
     _sd = new StateDevice(iface: _ha, address: _address);
 }
Exemple #2
0
        public void SetUp()
        {
            _data = null;
            _t    = new Netomity.Interfaces.Basic.Fakes.StubBasicInterface()
            {
                SendString        = (data) => { _data = data; },
                DataReceivedEvent = (ev) => { _t._DataReceived(ev); },
            };

            _ha = new HAInterface(iface: _t);
            _sp = new SendParams()
            {
                SendData        = "asdf",
                SuccessResponse = "asdfgood",
                FailureResponse = "asdfbad",
                Timeout         = 1,
            };
        }