Exemple #1
0
        public async void ReadJSDataAsStreamAsync_ThrowsNotSupportedException()
        {
            // Arrange
            var runtime       = new TestJSRuntime();
            var dataReference = new JSStreamReference(runtime, 10, 10);

            // Act
            var exception = await Assert.ThrowsAsync <NotSupportedException>(async() => await runtime.ReadJSDataAsStreamAsync(dataReference, 10, CancellationToken.None));

            // Assert
            Assert.Equal("The current JavaScript runtime does not support reading data streams.", exception.Message);
        }