Пример #1
0
 public void TrivialStruct()
 {
     //empty struct {}
     var trivial = DirStructure.OwnTestFileAsBytes("binary/trivial.bindat");
     var reader = new UserBinaryReader(new MemoryStream(trivial));
     ReaderTestCommon.TrivialStruct(reader);
 }
Пример #2
0
 public void OneBoolInStruct()
 {
     //simple datagram: {yolo:true}
     var oneBool = DirStructure.OwnTestFileAsBytes("binary/onebool.bindat");
     var reader = new UserBinaryReader(new MemoryStream(oneBool));
     ReaderTestCommon.OneBoolInStruct(reader);
 }
Пример #3
0
        public void SingleIntList()
        {
            var data   = DirStructure.OwnTestFileAsBytes("binary/single_int_list.bindat");
            var reader = new UserBinaryReader(new MemoryStream(data));

            ReaderTestCommon.SingleIntList(reader);
        }
Пример #4
0
 public void TwoLayer_TestStepout_Skip()
 {
     const string fileName = "binary/twolayer.bindat";
     var data = DirStructure.OwnTestFileAsBytes(fileName);
     var reader = new UserBinaryReader(new MemoryStream(data));
     ReaderTestCommon.TwoLayer_TestStepoutSkip(reader);
 }
Пример #5
0
        public void Combined1()
        {
            var data   = DirStructure.OwnTestFileAsBytes("binary/combined1.bindat");
            var reader = new UserBinaryReader(new MemoryStream(data));

            ReaderTestCommon.Combined1(reader);
        }
Пример #6
0
        public void Struct_OneBlob()
        {
            var data   = DirStructure.OwnTestFileAsBytes("binary/struct_oneblob.bindat");
            var reader = new UserBinaryReader(new MemoryStream(data));

            ReaderTestCommon.Struct_OneBlob(reader);
        }
Пример #7
0
        public void ReadTypeAnnotations_AssertUnknownSymbolException()
        {
            byte[] data = DirStructure.OwnTestFileAsBytes("binary/unknown_symbols.bindat");
            UserBinaryReader reader = new UserBinaryReader(new MemoryStream(data));

            ReaderTestCommon.ReadTypeAnnotations_AssertUnknownSymbolException(reader);
        }
Пример #8
0
        public void Date_2000_11_20_8_20_15_Unknown()
        {
            var        data   = DirStructure.OwnTestFileAsBytes("text/ts_2000_11_20_8_20_15_unknown.ion");
            IIonReader reader = new UserTextReader(new MemoryStream(data));

            ReaderTimestampCommon.Date_2000_11_20_8_20_15_Unknown(reader);
        }
Пример #9
0
        public void FlatIntList()
        {
            //a flat list of ints [123,456,789]
            var flatListInt = DirStructure.OwnTestFileAsBytes("binary/flatlist_int.bindat");

            var reader = new UserBinaryReader(new MemoryStream(flatListInt));
            ReaderTestCommon.FlatIntList(reader);
        }
Пример #10
0
        public void ReadTypeAnnotations_SingleField()
        {
            // a singlefield structure with annotations
            // {withannot:years::months::days::hours::minutes::seconds::18}
            byte[] data = DirStructure.OwnTestFileAsBytes("binary/annot_singlefield.bindat");
            UserBinaryReader reader = new UserBinaryReader(new MemoryStream(data));

            ReaderTestCommon.ReadTypeAnnotations_SingleField(reader);
        }
Пример #11
0
        public void SingleSymbol()
        {
            //struct with single symbol
            //{single_symbol:'something'}
            var data = DirStructure.OwnTestFileAsBytes("binary/single_symbol.bindat");

            var reader = new UserBinaryReader(new MemoryStream(data));
            ReaderTestCommon.SingleSymbol(reader);
        }
Пример #12
0
        public void HasAnnotationFalse_SingleField()
        {
            // a singlefield structure with annotations
            // {withannot:years::months::days::hours::minutes::seconds::18}
            byte[]         data   = DirStructure.OwnTestFileAsBytes("text/annot_singlefield.ion");
            UserTextReader reader = new UserTextReader(new MemoryStream(data));

            ReaderTestCommon.HasAnnotationFalse_SingleField(reader);
        }
Пример #13
0
        public void SingleIntList()
        {
            var data   = DirStructure.OwnTestFileAsBytes("text/single_int_list.ion");
            var reader = new UserTextReader(new MemoryStream(data));

            ReaderTestCommon.SingleIntList(reader);

            reader = new UserTextReader(Encoding.UTF8.GetString(data));
            ReaderTestCommon.SingleIntList(reader);
        }
Пример #14
0
        public void Combined1()
        {
            var data   = DirStructure.OwnTestFileAsBytes("text/combined1.ion");
            var reader = new UserTextReader(new MemoryStream(data));

            ReaderTestCommon.Combined1(reader);

            reader = new UserTextReader(Encoding.UTF8.GetString(data));
            ReaderTestCommon.Combined1(reader);
        }
Пример #15
0
        public void Struct_OneBlob()
        {
            var data   = DirStructure.OwnTestFileAsBytes("text/struct_oneblob.ion");
            var reader = new UserTextReader(new MemoryStream(data));

            ReaderTestCommon.Struct_OneBlob(reader);

            reader = new UserTextReader(Encoding.UTF8.GetString(data));
            ReaderTestCommon.Struct_OneBlob(reader);
        }
Пример #16
0
        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 converter        = new SaveAnnotationsReaderRoutine();
            var reader           = new UserBinaryReader(new MemoryStream(annotSingleField), converter);

            ReaderTestCommon.ReadAnnotations_SingleField(reader, converter);
        }
Пример #17
0
        public void OneBoolInStruct()
        {
            //simple datagram: {yolo:true}
            var oneBool = DirStructure.OwnTestFileAsBytes("text/onebool.ion");
            var reader  = new UserTextReader(new MemoryStream(oneBool));

            ReaderTestCommon.OneBoolInStruct(reader);

            reader = new UserTextReader(Encoding.UTF8.GetString(oneBool));
            ReaderTestCommon.OneBoolInStruct(reader);
        }
Пример #18
0
        public void TrivialStruct()
        {
            //empty struct {}
            var trivial = DirStructure.OwnTestFileAsBytes("text/trivial.ion");
            var text    = Encoding.UTF8.GetString(trivial);

            var reader = new UserTextReader(text);

            ReaderTestCommon.TrivialStruct(reader);

            reader = new UserTextReader(new MemoryStream(trivial));
            ReaderTestCommon.TrivialStruct(reader);
        }
Пример #19
0
        public void SingleSymbol()
        {
            //struct with single symbol
            //{single_symbol:'something'}
            var data = DirStructure.OwnTestFileAsBytes("text/single_symbol.ion");

            var reader = new UserTextReader(new MemoryStream(data));

            ReaderTestCommon.SingleSymbol(reader);

            reader = new UserTextReader(Encoding.UTF8.GetString(data));
            ReaderTestCommon.SingleSymbol(reader);
        }
Пример #20
0
        public void FlatScalar()
        {
            //a flat struct of scalar values:
            //boolean:true
            //str:"yes"
            //integer:123456
            //longInt:int.Max*2
            //bigInt:long.Max*10
            //double:2213.1267567f
            var flatScalar = DirStructure.OwnTestFileAsBytes("binary/flat_scalar.bindat");

            var reader = new UserBinaryReader(new MemoryStream(flatScalar));
            ReaderTestCommon.FlatScalar(reader);
        }
Пример #21
0
        public void FlatScalar()
        {
            //a flat struct of scalar values:
            //boolean:true
            //str:"yes"
            //integer:123456
            //longInt:int.Max*2
            //bigInt:long.Max*10
            //double:2213.1267567f
            var flatScalar = DirStructure.OwnTestFileAsBytes("text/flat_scalar.ion");

            var reader = new UserTextReader(new MemoryStream(flatScalar));

            ReaderTestCommon.FlatScalar(reader);

            reader = new UserTextReader(Encoding.UTF8.GetString(flatScalar));
            ReaderTestCommon.FlatScalar(reader);
        }