hmrc/play-hal

HalLinks equality is dependent on order of links

Opened this issue · 0 comments

For example, this test fails:

test("HalLinks should be equal regardless of link order") {
    Hal.links(
      HalLink("self", "/orders"),
      HalLink("ea:admin", "/admins/1")
    ) should equal(
      Hal.links(
        HalLink("ea:admin", "/admins/1"),
        HalLink("self", "/orders")
      )
    )
  }

Please clarify if the ordered nature when specifying multiple links is a conscious design decision.