AutoHotKey 1st version.

This commit is contained in:
2022-01-11 11:57:48 -03:00
parent 6500927d33
commit 9832e1ddc6
3 changed files with 68 additions and 0 deletions
@@ -0,0 +1,12 @@
Feature: The AutoHotKey API client
# ======================== AutoHotKey Test ========================
Scenario: Testing the AutoHotKey client
Given the AutoHotKey client
When the test method is called
Then the string "AHK Svc Ok" must be returned
# ======================== AutoHotKey Test ========================
Scenario: Using an AutoHotKey command through AutoHotKey client
Given the AutoHotKey client
When the do method is called
Then if there is a return in AHK, it must appear
+26
View File
@@ -0,0 +1,26 @@
from behave import *
from cli import AutoHotKey
# ================================== AutoHotKey Test ==================================
@given(u'the AutoHotKey client')
def step_impl(context):
context.client = AutoHotKey ()
@when(u'the test method is called')
def step_impl(context):
context.test_return = context.client.test ()
@then(u'the string "AHK Svc Ok" must be returned')
def step_impl(context):
assert context.test_return == "AHK Svc Ok", "There is something wrong with te AHK or it's service."
# ================================== AutoHotKey Do ==================================
@when(u'the do method is called')
def step_impl(context):
context.do_return = context.client.do ('clipboard := "Riptide"')
@then(u'if there is a return in AHK, it must appear')
def step_impl(context):
assert context.do_return == "", "Something went wrong with the command given."