Exemplo n.º 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>());
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        public async void BinaryReadThrowsFileNotFoundException()
        {
            var html = new TemplateHtml("file_not_found");

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