예제 #1
0
        public void GetBytesTest()
        {
            var path = Environment.OSVersion.Platform == PlatformID.Unix ? "/Test.txt" : "C:/Test.txt";

            var utf8bom  = new UTF8Encoding(true);
            var bytes    = utf8bom.GetBytes("Hello World!");
            var preamble = utf8bom.Preamble;

            Assert.Equal(bytes, rs.GetBytes(rs.RelativeUri(path)).Skip(preamble.Length).ToArray());
        }