public void WhenISendAActionWithThePayload(string p0) { ChimpAction action = ChimpAction.Tap; Enum.TryParse<ChimpAction>(p0, out action); _payload.action = action; if (_mock != null) { _mock.Setup(x => x.Play(_payload)) .Returns(new ChimpReturnMessage() { result = "OK" }); chimpRemoteDevice = _mock.Object; } chimpReturnMessage = chimpRemoteDevice.Play(_payload); //app.Button("butonId").Tap().With("ssasasas"); }
public void WhenISendAPlayCommandToWith(string action, string componentType, string monkeyId, string args) { chimpReturnMessage = chimpRemoteDevice.Element(componentType, monkeyId).With(args).Play(action); chimpReturnMessage = chimpRemoteDevice.Element(MonkeyTalkComponent.Button, "button1").With(args).Play(a.Tap); chimpRemoteDevice.Button("id").Tap(); chimpRemoteDevice.Slider("id").With("args").SwipeRight(); }
public void WhenISendASimplePlayCommandPayload() { //default payload - Tap and call Play _payload = new MonkeyTalkWirePayload() { action = ChimpAction.Tap, mtcommand = MonkeyTalkCommand.PLAY }; _mock.Setup(x => x.Play(_payload)).Returns(new ChimpReturnMessage() { result = "OK", message = "mocked test result" }); chimpRemoteDevice = _mock.Object; chimpReturnMessage = chimpRemoteDevice.Play(_payload); }