tokopedia / gripmock

gRPC Mock Server
Apache License 2.0
659 stars 156 forks source link

New input matching rule: equals_unordered #168

Closed mytestopia closed 2 months ago

mytestopia commented 2 months ago

Added new inut matching rule equals_unordered, allowing find stubs for lists with different order

For example stub

{
  .
  .
  "input":{
    "equals_unordered":{
      "ids": [1, 2]
    }
  }
  .
  .
}

will match requests with ids=[1, 2] and ids=[2, 1]

when stub

{
  .
  .
  "input":{
    "equals":{
      "ids": [1, 2]
    }
  }
  .
  .
}

will match only requests with ids=[1, 2]