Skip to content

test: JSON deserialisation tests#4

Draft
liamhughes wants to merge 3 commits intomainfrom
lh/add-json-deserialisation-tests
Draft

test: JSON deserialisation tests#4
liamhughes wants to merge 3 commits intomainfrom
lh/add-json-deserialisation-tests

Conversation

@liamhughes
Copy link

No description provided.

}

@Test
void shouldDeserializeToggleWithSegments() throws Exception {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently fails. I haven't worked out if it is a problem with the test or the client code yet.

Copy link
Author

@liamhughes liamhughes Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now think it is a problem with the client code.

OctoToggle returns segments like this:

[
  {
    "key": "license-type",
    "value": "free"
  },
  {
    "key": "country",
    "value": "au"
  }
]

The client is expecting segments like this:

[
  {
    "license-type": "free"
  },
  {
    "country": "au"
  }
]

}

@Test
void shouldIgnoreExtraneousProperties() throws Exception {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant