public void SetLengthThrows() { var stream = new HttpRequestStream(Mock.Of <IHttpBodyControlFeature>()); Assert.Throws <NotSupportedException>(() => stream.SetLength(0)); }