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>()); }
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); }
public async void BinaryReadThrowsFileNotFoundException() { var html = new TemplateHtml("file_not_found"); await Assert.ThrowsAsync <MatrixDotNetException>(() => html.BinaryOpenAsync <int>()); }