def testReadCorrectConstraints(self):
    value8 = self.VALUE8_CORRECT_CONSTRAINT
    writer = zserio.BitStreamWriter()
    self._writeValue8(writer, value8)
    reader = zserio.BitStreamReader(writer.getByteArray())
    unionConstraints = self.api.UnionConstraints()
    unionConstraints.read(reader)
    self.assertEqual(self.api.UnionConstraints.CHOICE_value8, unionConstraints.choiceTag())
    self.assertEqual(value8, unionConstraints.getValue8())
def testReadCorrectConstraints(self):
    value8 = self.VALUE8_CORRECT_CONSTRAINT
    writer = zserio.BitStreamWriter()
    self._writeValue8(writer, value8)
    reader = zserio.BitStreamReader(writer.getByteArray())
    unionConstraints = self.api.UnionConstraints()
    unionConstraints.read(reader)
    self.assertEqual(self.api.UnionConstraints.CHOICE_value8, unionConstraints.choiceTag())
    self.assertEqual(value8, unionConstraints.getValue8())