public void ShouldOpenFileAndReadStream() { var mockstream = new Mock <Stream>(); mockstream.Setup(x => x.CanRead).Returns(true); var streamreader = new StreamReader(mockstream.Object); _csvReader.Open(Filename); var stream = _csvReader.GetStream(); Assert.That(stream, Is.EqualTo(streamreader)); _csvReader.Close(); }