public void ReadAnnotations_SingleField() { // a singlefield structure with annotations // {withannot:years::months::days::hours::minutes::seconds::18} var annotSingleField = DirStructure.OwnTestFileAsBytes("binary/annot_singlefield.bindat"); var reader = new UserBinaryReader(new MemoryStream(annotSingleField)); ReaderTestCommon.ReadAnnotations_SingleField(reader); }
public void ValueWithAnnotationTest() { //Must be: {withannot: years::months::days::hours::minutes::seconds::18} var intValue = _ionValueFactory.NewInt(18); intValue.AddTypeAnnotation("years"); intValue.AddTypeAnnotation("months"); intValue.AddTypeAnnotation("days"); intValue.AddTypeAnnotation("hours"); intValue.AddTypeAnnotation("minutes"); intValue.AddTypeAnnotation("seconds"); var value = new IonStruct { { "withannot", intValue } }; var reader = new UserTreeReader(value); ReaderTestCommon.ReadAnnotations_SingleField(reader); }