CxAgent.Plugins.Testing 0.9.49

dotnet add package CxAgent.Plugins.Testing --version 0.9.49
                    
NuGet\Install-Package CxAgent.Plugins.Testing -Version 0.9.49
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CxAgent.Plugins.Testing" Version="0.9.49" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CxAgent.Plugins.Testing" Version="0.9.49" />
                    
Directory.Packages.props
<PackageReference Include="CxAgent.Plugins.Testing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CxAgent.Plugins.Testing --version 0.9.49
                    
#r "nuget: CxAgent.Plugins.Testing, 0.9.49"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CxAgent.Plugins.Testing@0.9.49
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CxAgent.Plugins.Testing&version=0.9.49
                    
Install as a Cake Addin
#tool nuget:?package=CxAgent.Plugins.Testing&version=0.9.49
                    
Install as a Cake Tool

CxAgent.Plugins.Testing

Check and call a cxagent plugin from a test, with no session and no model. It uses the loaders, the permission gate and the lifecycle a session uses, so a plugin that passes here loads and asks the way it will for a user. It is the same engine as cxagent plugin check and cxagent plugin call.

Native plugins work too: the package carries the plugin host, so a test needs no cxagent installed.

<PackageReference Include="CxAgent.Plugins.Testing" Version="0.9.*" />
using CxAgent.Plugins.Testing;

[Fact]
public async Task SearchAsksAndAnswers()
{
    Assert.Empty(await PluginHarness.CheckAsync(PluginDir));          // what check reports

    await using var plugin = await PluginHarness.LoadAsync(PluginDir);
    var call = await plugin.CallAsync("search", new { city = "Athens" }, answer: GateAnswer.Allow);

    Assert.Equal("look up the weather for Athens", call.Gate?.Display);
    Assert.True(call.Result!.Success);
    Assert.Contains(call.Progress, p => p.Percent == 50);
}

PluginDir is a plugin folder: its <name>.plugin.json and the library beside it, as a user installs it.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.9.49 0 10/23/2026
0.9.48 42 10/22/2026
0.9.47 43 10/22/2026
0.9.46 46 10/22/2026
0.9.45 40 10/21/2026
0.9.44 38 10/21/2026
0.9.43 46 10/20/2026
0.9.41 77 10/20/2026
0.9.40 92 10/19/2026
0.9.39 77 10/19/2026
0.9.38 92 10/19/2026
0.9.37 82 10/19/2026