Sha256: 5a883e8bd8fea15070f679e5e0d10e645574ee8d7923f36075e982abf1b5b834

Contents?: true

Size: 1.3 KB

Versions: 1

Compression:

Stored size: 1.3 KB

Contents

Feature: Handling data types

  The data generated needs to have the correct properties or items, including
  the data type specified

  Scenario: Strings
    Given the following JSON schema:
      """json
      {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          }
        }
      }
      """
    When I run the JSON data generator
    Then the JSON output should be:
      """json
      {"name":"a"}
      """

  Scenario: Numbers
    Given the following JSON schema:
      """json
      {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          }
        }
      }
      """
    When I run the JSON data generator
    Then the JSON output should be:
      """json
      {"id":1}
      """

  Scenario: Booleans
    Given the following JSON schema:
      """json
      {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
          "admin": {
            "type": "boolean"
          }
        }
      }
      """
    When I run the JSON data generator
    Then the JSON output should be:
      """json
      {"admin":true}
      """

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
json_test_data-0.1.0 features/data_types.feature