예제 #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);
        }
예제 #3
0
        public async void BinaryReadThrowsFileNotFoundException()
        {
            var html = new TemplateHtml("file_not_found");

            await Assert.ThrowsAsync <MatrixDotNetException>(() => html.BinaryOpenAsync <int>());
        }