public void ThrowsInvalidOperationExceptin_WhenNoStreamIsAssigned()
 {
     var streamDecorator = new StreamDecoratorTestStream(null);
     
     streamDecorator.Invoking(s => s.Position = 10)
         .ShouldThrow<InvalidOperationException>();
 }
Exemplo n.º 2
0
        public void ThrowsInvalidOperationExceptin_WhenNoStreamIsAssigned()
        {
            var streamDecorator = new StreamDecoratorTestStream(null);

            streamDecorator.Invoking(s => s.Position = 10)
            .ShouldThrow <InvalidOperationException>();
        }
 public StreamDecoratorStreamReadWriteFacts()
 {
     this.memoryStream    = new MemoryStream();
     this.streamDecorator = new StreamDecoratorTestStream(this.memoryStream);
 }
 public StreamDecoratorStreamPropertiesTest()
 {
     this.testStream      = new TestStream();
     this.streamDecorator = new StreamDecoratorTestStream(this.testStream);
 }
 public StreamDecoratorStreamReadWriteTest()
 {
     this.memoryStream = new MemoryStream();
     this.streamDecorator = new StreamDecoratorTestStream(this.memoryStream);
 }
 public StreamDecoratorStreamPropertiesTest()
 {
     this.testStream = new TestStream();
     this.streamDecorator = new StreamDecoratorTestStream(this.testStream);
 }