27 references to FromSource
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.CodeAnalysis (4)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (15)
EmbeddedTextTests.cs (15)
34Assert.Throws<ArgumentNullException>("filePath", () => EmbeddedText.FromSource(null, null));
35Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromSource("", null));
36Assert.Throws<ArgumentNullException>("text", () => EmbeddedText.FromSource("path", null));
39Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From("source")));
42Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new byte[0], 0, Encoding.UTF8, canBeEmbedded: false)));
43Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new MemoryStream(new byte[0]), Encoding.UTF8, canBeEmbedded: false)));
104var text = EmbeddedText.FromSource("pathToEmpty", source);
146var text = EmbeddedText.FromSource("pathToSmall", source);
188var text = EmbeddedText.FromSource("pathToLarge", source);
201var expectedEmbedded = EmbeddedText.FromSource("pathToSmall", expected);
204var actualEmbedded = EmbeddedText.FromSource(expectedEmbedded.FilePath, actual);
216var expectedEmbedded = EmbeddedText.FromSource("pathToSmall", expected);
219var actualEmbedded = EmbeddedText.FromSource(expectedEmbedded.FilePath, actual);
239var text = EmbeddedText.FromSource("pathToPrecomputed", source);
253var text = EmbeddedText.FromSource("pathToLarge", source);