Last active
September 6, 2017 05:19
-
-
Save ryankennedy/f3b316261267dbd13a2e27e6881c2b22 to your computer and use it in GitHub Desktop.
Cucumber definition for a simple Protocol Buffer parsing test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Parsing Protocol Buffer schemas | |
Scenario: Parsing a valid Protocol Buffer schema | |
Given a Protocol Buffer schema named my_message.proto with body | |
""" | |
syntax = "proto3"; | |
message MyMessage { | |
string message_content = 1; | |
} | |
""" | |
When my_message.proto is parsed | |
Then parsing my_message.proto should succeed | |
And my_message.proto should have a message named MyMessage with the fields | |
| type | name | tag | | |
| string | message_content | 1 | | |
Scenario: Parsing an invalid Protocol Buffer schema | |
Given a Protocol Buffer schema named not_really_a.proto with body | |
""" | |
this is not a protobuf schema | |
""" | |
When not_really_a.proto is parsed | |
Then parsing not_really_a.proto should fail |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment