Exemplo n.º 1
0
        public void CanEncodeAsBytes()
        {
            var bstring  = new BString("hello world");
            var expected = Encoding.ASCII.GetBytes("11:hello world");

            var bytes = bstring.EncodeAsBytes();

            bytes.Should().BeEquivalentTo(expected);
        }
Exemplo n.º 2
0
        public void ValueStringTest()
        {
            BString vs = new BString();

            Assert.That(vs.EncodeAsBytes(), Is.EqualTo(new byte[0]));
        }