16 references to FromStream
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.UnitTests (11)
EmbeddedTextTests.cs (11)
49Assert.Throws<ArgumentNullException>("filePath", () => EmbeddedText.FromStream(null, null));
50Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromStream("", null));
51Assert.Throws<ArgumentNullException>("stream", () => EmbeddedText.FromStream("path", null));
52Assert.Throws<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotReadStream()));
53Assert.Throws<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotSeekStream()));
54Assert.Throws<ArgumentException>("checksumAlgorithm", () => EmbeddedText.FromStream("path", new MemoryStream(), SourceHashAlgorithm.None));
60Assert.Throws<IOException>(() => EmbeddedText.FromStream("path", new HugeStream()));
61Assert.Throws<EndOfStreamException>(() => EmbeddedText.FromStream("path", new TruncatingStream(10)));
62Assert.Throws<EndOfStreamException>(() => EmbeddedText.FromStream("path", new TruncatingStream(1000)));
63Assert.Throws<IOException>(() => EmbeddedText.FromStream("path", new ReadFailsStream()));
91var text = EmbeddedText.FromStream("pathToEmpty", new MemoryStream(new byte[0]), SourceHashAlgorithm.Sha1);
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)