| // OCCukes OCCucumberRuntime+WireProtocol.h |
| // |
| // Copyright © 2012, 2013, The OCCukes Organisation. All rights reserved. |
| // |
| // Permission is hereby granted, free of charge, to any person obtaining a copy |
| // of this software and associated documentation files (the “Software”), to deal |
| // in the Software without restriction, including without limitation the rights |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| // copies of the Software, and to permit persons to whom the Software is |
| // furnished to do so, subject to the following conditions: |
| // |
| // The above copyright notice and this permission notice shall be included in |
| // all copies or substantial portions of the Software. |
| // |
| // THE SOFTWARE IS PROVIDED “AS IS,” WITHOUT WARRANTY OF ANY KIND, EITHER |
| // EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO |
| // EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES |
| // OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| // DEALINGS IN THE SOFTWARE. |
| // |
| //------------------------------------------------------------------------------ |
| |
| #import "OCCucumberRuntime.h" |
| |
| extern NSString *const OCCucumberRuntimeUnhandledStepNotification;
|
|
extern NSString *const OCCucumberRuntimeUnhandledStepNameKey;
|
| |
| @interface OCCucumberRuntime(WireProtocol) |
| |
| - (id)handleWirePacketWithObject:(id)object; |
| - (id)handleWirePacketWithArray:(NSArray *)array; |
| |
| /** |
| * Finds out whether the wire server has a definition for a given step. |
| * |
| * When features have been parsed, Cucumber will send a "step_matches" |
| * message to ask the wire server if it can match a step name. This happens for |
| * each of the steps in each of the features. |
| * |
| * @result The wire server replies with an array of Step Match objects. |
| * Each Step Match hash element comprises the following key-value pairs. |
| * - An "id" string identifier for the step definition to be referenced later |
| * when it needs to be invoked. The identifier can be any string value and is |
| * simply used for wire server's own reference. |
| * - An "args" array for any argument values captured by the wire end's own |
| * regular expression (or other argument matching) process. |
| */ |
| - (id)handleStepMatchesWithHash:(NSDictionary *)hash; |
| |
| /** |
| * Requests a snippet for an undefined step. |
| */ |
| - (id)handleSnippetTextWithHash:(NSDictionary *)hash; |
| |
| /** |
| * Signals that Cucumber is about to execute a scenario. |
| */ |
| - (id)handleBeginScenario; |
| |
| /** |
| * Signals that Cucumber has finished executing a scenario. |
| */ |
| - (id)handleEndScenario; |
| |
| /** |
| * Asks for a step definition to be invoked. |
| */ |
| - (id)handleInvokeWithHash:(NSDictionary *)hash; |
| |
| @end |