public virtual void ShouldDecodeString()
        {
            var stringType = new StringType();
            var result     = stringType.Encode("MonkeyMediumSizeString");

            Assert.Equal("MonkeyMediumSizeString", stringType.Decode <string>(result));
        }
 public virtual void ShouldDecodeLongString()
 {
     var stringType = new StringType();
     var longString = "MonkeyVeryLongStringmljalkdjflksjf lkdfjlsfjalkfjlsflskfjlsflsfjasdfjlsjflksfjlskjf fjlskfjlsjfs fkj lakdflsjfsa fafd sa";
     var result = stringType.Encode(longString);
     Assert.Equal(longString, stringType.Decode<string>(result));
 }
        public virtual void ShouldDecodeLongString()
        {
            var stringType = new StringType();
            var longString = "MonkeyVeryLongStringmljalkdjflksjf lkdfjlsfjalkfjlsflskfjlsflsfjasdfjlsjflksfjlskjf fjlskfjlsjfs fkj lakdflsjfsa fafd sa";
            var result     = stringType.Encode(longString);

            Assert.Equal(longString, stringType.Decode <string>(result));
        }
Exemple #4
0
        public void StringDecode()
        {
            byte[] data = new byte[5];
            data[0] = 72;
            data[1] = 101;
            data[2] = 108;
            data[3] = 108;
            data[4] = 111;
            object obj = datatype.Decode(data);

            Assert.True(obj is string);
            Assert.True(((string)obj).Equals("Hello"));
        }
 public virtual void ShouldDecodeString()
 {
     var stringType = new StringType();
     var result = stringType.Encode("MonkeyMediumSizeString");
     Assert.Equal("MonkeyMediumSizeString", stringType.Decode<string>(result));
 }