예제 #1
0
        public void ProperStreamRead()
        {
            var sourceArray = new byte[] { 1, 2, 3, 4 };
            var stream      = new ProperStreamRead_TestStream(sourceArray);

            var builder = new BlobBuilder();

            Assert.Equal(sourceArray.Length, builder.TryWriteBytes(stream, sourceArray.Length));
            AssertEx.Equal(sourceArray, builder.ToArray());
        }
예제 #2
0
파일: BlobTests.cs 프로젝트: ESgarbi/corefx
        public void ProperStreamRead()
        {
            var sourceArray = new byte[] { 1, 2, 3, 4 };
            var stream = new ProperStreamRead_TestStream(sourceArray);

            var builder = new BlobBuilder();
            Assert.Equal(sourceArray.Length, builder.TryWriteBytes(stream, sourceArray.Length));
            AssertEx.Equal(sourceArray, builder.ToArray());
        }