< Summary

Class:Azure.Core.TestFramework.NonSeekableMemoryStream
Assembly:Azure.Core.TestFramework
File(s):C:\Git\azure-sdk-for-net\sdk\core\Azure.Core.TestFramework\src\NonSeekableMemoryStream.cs
Covered lines:7
Uncovered lines:3
Coverable lines:10
Total lines:37
Line coverage:70% (7 of 10)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
get_CanSeek()-100%100%
Seek(...)-0%100%
get_Position()-0%100%
set_Position(...)-0%100%
Reset()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\core\Azure.Core.TestFramework\src\NonSeekableMemoryStream.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using System.IO;
 6
 7namespace Azure.Core.TestFramework
 8{
 9    public class NonSeekableMemoryStream : MemoryStream
 10    {
 2411        public NonSeekableMemoryStream()
 12        {
 2413        }
 14
 2415        public NonSeekableMemoryStream(byte[] buffer) : base(buffer)
 16        {
 2417        }
 18
 4819        public override bool CanSeek => false;
 20
 21        public override long Seek(long offset, SeekOrigin loc)
 22        {
 023            throw new NotImplementedException();
 24        }
 25
 26        public override long Position
 27        {
 028            get => throw new NotImplementedException();
 029            set => throw new NotImplementedException();
 30        }
 31
 32        public void Reset()
 33        {
 2434            base.Position = 0;
 2435        }
 36    }
 37}