Skip to content

test: JSON deserialisation tests#4

Closed
liamhughes wants to merge 5 commits intomainfrom
lh/add-json-deserialisation-tests
Closed

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

Conversation

@liamhughes
Copy link
Copy Markdown
Contributor

No description provided.

}

@Test
void shouldDeserializeToggleWithSegments() throws Exception {
Copy link
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This fails.

@liamhughes
Copy link
Copy Markdown
Contributor Author

Replaced with #5.

@liamhughes liamhughes closed this Mar 26, 2026
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