public void testDecodeChoiceInChoice() { IDecoder decoder = newDecoder(); System.IO.MemoryStream stream = new System.IO.MemoryStream(coderTestUtils.createChoiceInChoiceBytes()); BugValueType val = decoder.decode <BugValueType>(stream); Assert.AreEqual(val.isBugPrimitiveSelected(), coderTestUtils.createChoiceInChoice().isBugPrimitiveSelected()); Assert.AreEqual(val.BugPrimitive.isBugIntegerSelected(), coderTestUtils.createChoiceInChoice().BugPrimitive.isBugIntegerSelected()); Assert.AreEqual(val.BugPrimitive.BugInteger, coderTestUtils.createChoiceInChoice().BugPrimitive.BugInteger); }
public BugValueType createChoiceInChoice() { BugPrimitive primitive = new BugPrimitive(); primitive.selectBugInteger(5); BugValueType valueType = new BugValueType(); valueType.selectBugPrimitive(primitive); return(valueType); }