コード例 #1
0
        public async void BinaryReadThrowsUnsupportedTypeException()
        {
            var matrix = BuildMatrix.BuildRandom <byte>(15, 12);
            var html   = new TemplateHtml("test");

            await html.BinarySaveAsync(matrix);

            await Assert.ThrowsAsync <NotSupportedTypeException>(() => html.BinaryOpenAsync <char>());
        }
コード例 #2
0
        public async void BinaryWriteReadByte()
        {
            var matrix = BuildMatrix.BuildRandom <byte>(15, 12);
            var html   = new TemplateHtml("test");

            await html.BinarySaveAsync(matrix);

            var resultMatrix = await html.BinaryOpenAsync <byte>();

            Assert.Equal(matrix, resultMatrix);
        }