17 references to AsBuilder
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceEmbeddingGeneratorTests.cs (1)
67
.
AsBuilder
()
Microsoft.Extensions.AI.Integration.Tests (2)
EmbeddingGeneratorIntegrationTests.cs (2)
85
.
AsBuilder
()
115
.
AsBuilder
()
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaEmbeddingGeneratorTests.cs (1)
33
.
AsBuilder
()
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIEmbeddingGeneratorTests.cs (2)
82
.
AsBuilder
()
105
.
AsBuilder
()
Microsoft.Extensions.AI.Tests (11)
Embeddings\ConfigureOptionsEmbeddingGeneratorTests.cs (2)
24
var builder = innerGenerator.
AsBuilder
();
49
.
AsBuilder
()
Embeddings\EmbeddingGeneratorBuilderTests.cs (3)
39
var builder = expectedInnerGenerator.
AsBuilder
();
61
Assert.Throws<ArgumentNullException>("innerGenerator", () => ((IEmbeddingGenerator<string, Embedding<float>>)null!).
AsBuilder
());
75
var builder = innerGenerator.
AsBuilder
();
Embeddings\LoggingEmbeddingGeneratorTests.cs (6)
28
Assert.Null(innerGenerator.
AsBuilder
().UseLogging(NullLoggerFactory.Instance).Build().GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>)));
29
Assert.Same(innerGenerator, innerGenerator.
AsBuilder
().UseLogging(NullLoggerFactory.Instance).Build().GetService(typeof(IEmbeddingGenerator<string, Embedding<float>>)));
32
Assert.NotNull(innerGenerator.
AsBuilder
().UseLogging(factory).Build().GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>)));
37
Assert.NotNull(innerGenerator.
AsBuilder
().UseLogging().Build(services).GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>)));
38
Assert.NotNull(innerGenerator.
AsBuilder
().UseLogging(null).Build(services).GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>)));
39
Assert.Null(innerGenerator.
AsBuilder
().UseLogging(NullLoggerFactory.Instance).Build(services).GetService(typeof(LoggingEmbeddingGenerator<string, Embedding<float>>)));