{
  "description": "deleteOne",
  "schemaVersion": "1.0",
  "createEntities": [
    {
      "client": {
        "id": "client0"
      }
    },
    {
      "database": {
        "id": "database0",
        "client": "client0",
        "databaseName": "crud-v1"
      }
    },
    {
      "collection": {
        "id": "collection0",
        "database": "database0",
        "collectionName": "coll"
      }
    }
  ],
  "initialData": [
    {
      "collectionName": "coll",
      "databaseName": "crud-v1",
      "documents": [
        {
          "_id": 1,
          "x": 11
        },
        {
          "_id": 2,
          "x": 22
        },
        {
          "_id": 3,
          "x": 33
        }
      ]
    }
  ],
  "tests": [
    {
      "description": "DeleteOne when many documents match",
      "operations": [
        {
          "object": "collection0",
          "name": "deleteOne",
          "arguments": {
            "filter": {
              "_id": {
                "$gt": 1
              }
            }
          },
          "expectResult": {
            "deletedCount": 1
          }
        }
      ]
    },
    {
      "description": "DeleteOne when one document matches",
      "operations": [
        {
          "object": "collection0",
          "name": "deleteOne",
          "arguments": {
            "filter": {
              "_id": 2
            }
          },
          "expectResult": {
            "deletedCount": 1
          }
        }
      ],
      "outcome": [
        {
          "collectionName": "coll",
          "databaseName": "crud-v1",
          "documents": [
            {
              "_id": 1,
              "x": 11
            },
            {
              "_id": 3,
              "x": 33
            }
          ]
        }
      ]
    },
    {
      "description": "DeleteOne when no documents match",
      "operations": [
        {
          "object": "collection0",
          "name": "deleteOne",
          "arguments": {
            "filter": {
              "_id": 4
            }
          },
          "expectResult": {
            "deletedCount": 0
          }
        }
      ],
      "outcome": [
        {
          "collectionName": "coll",
          "databaseName": "crud-v1",
          "documents": [
            {
              "_id": 1,
              "x": 11
            },
            {
              "_id": 2,
              "x": 22
            },
            {
              "_id": 3,
              "x": 33
            }
          ]
        }
      ]
    }
  ]
}
