Consolonia.NUnit 11.2.5-beta.1026

This is a prerelease version of Consolonia.NUnit.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Consolonia.NUnit --version 11.2.5-beta.1026
                    
NuGet\Install-Package Consolonia.NUnit -Version 11.2.5-beta.1026
                    
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="Consolonia.NUnit" Version="11.2.5-beta.1026" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Consolonia.NUnit" Version="11.2.5-beta.1026" />
                    
Directory.Packages.props
<PackageReference Include="Consolonia.NUnit" />
                    
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 Consolonia.NUnit --version 11.2.5-beta.1026
                    
#r "nuget: Consolonia.NUnit, 11.2.5-beta.1026"
                    
#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 Consolonia.NUnit@11.2.5-beta.1026
                    
#: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=Consolonia.NUnit&version=11.2.5-beta.1026&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Consolonia.NUnit&version=11.2.5-beta.1026&prerelease
                    
Install as a Cake Tool

Consolonia.NUnit

This package provides testing support for testing consolonia controls using NUnit.

Background

Consolonia is a TUI (Text User Interface) (GUI Framework) implementation for Avalonia UI

Supports XAML, data bindings, animation, styling and the rest from Avalonia.

Showcase (click picture to see video)

datagridpic

Usage

To create a unit test against your consolonia application your test class should derive from ConsoloniaAppTestBase<App$gt;.

You can define the size of your console by passing size parameter to base class.

Then you can use UITest to interact with your application, and use UITest.AssertHasText() to verify the screen of text matches your expectation.

UITest.AssertHasText()

Takes one or more Regex patterns and verifies that the screen contains the text that matches the pattern.

UITest.AssertHasNoText()

Takes one or more Regex patterns and verifies that the screen does not contain the text that matches the pattern.

Example

    public class Tests : ConsoloniaAppTestBase<App>
    {
        public Tests : base(new PixelBufferSize(80, 40))
        {
        }


        [Test]
        public async Task DisplaysBasicText()
        {
            await UITest.KeyInput(Key.Tab);
            await UITest.AssertHasText("This is TextBlock");
        }
    }
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
11.3.4-beta.1414 0 8/29/2025
11.3.4-beta.1408 17 8/28/2025
11.3.4-beta.1406 15 8/28/2025
11.3.4-beta.1396 18 8/28/2025
11.3.4-beta.1384 15 8/28/2025
11.3.4-beta.1374 15 8/28/2025
11.3.4-beta.1371 17 8/27/2025
11.3.4-beta.1369 16 8/27/2025
11.3.4-beta.1365 16 8/27/2025
11.3.4-beta.1359 16 8/27/2025
11.3.4-beta.1334 18 8/26/2025
11.3.4-beta.1325 22 8/26/2025
11.3.4-beta.1313 108 8/20/2025
11.2.5-beta.1305 111 8/19/2025
11.2.5-beta.1302 109 8/19/2025
11.2.5-beta.1298 112 8/18/2025
11.2.5-beta.1296 111 8/17/2025
11.2.5-beta.1294 111 8/17/2025
11.2.5-beta.1290 89 8/17/2025
11.2.5-beta.1287 84 8/17/2025
11.2.5-beta.1284 88 8/17/2025
11.2.5-beta.1278 40 8/16/2025
11.2.5-beta.1276 45 8/16/2025
11.2.5-beta.1273 47 8/16/2025
11.2.5-beta.1270 41 8/16/2025
11.2.5-beta.1264 41 8/16/2025
11.2.5-beta.1261 43 8/16/2025
11.2.5-beta.1259 47 8/16/2025
11.2.5-beta.1228 119 8/13/2025
11.2.5-beta.1221 71 8/10/2025
11.2.5-beta.1218 75 8/10/2025
11.2.5-beta.1213 69 8/10/2025
11.2.5-beta.1209 72 8/10/2025
11.2.5-beta.1207 77 8/10/2025
11.2.5-beta.1197 74 8/9/2025
11.2.5-beta.1176 116 8/3/2025
11.2.5-beta.1142 99 7/30/2025
11.2.5-beta.1102 56 7/4/2025
11.2.5-beta.1090 132 6/17/2025
11.2.5-beta.1077 123 6/3/2025
11.2.5-beta.1075 125 6/2/2025
11.2.5-beta.1065 137 4/8/2025
11.2.5-beta.1050 115 3/28/2025
11.2.5-beta.1047 117 3/27/2025
11.2.5-beta.1044 118 3/27/2025
11.2.5-beta.1026 142 3/23/2025
11.2.5-beta.1023 147 3/22/2025
11.2.5-beta.1018 136 3/22/2025
11.2.5-beta.1016 137 3/22/2025
11.2.5-beta.1008 59 3/22/2025
11.2.5-beta.1004 62 3/21/2025
11.2.5-beta.988 58 3/15/2025
11.2.5-beta.965 74 3/1/2025
11.2.5-beta.959 66 2/28/2025
11.2.3-beta.954 75 2/27/2025
11.2.3-beta.946 80 2/24/2025
11.2.3-beta.936 75 2/7/2025
11.2.3-beta.920 72 2/6/2025
11.2.3-beta.906 74 2/2/2025
11.2.3-beta.902 79 2/1/2025
11.2.3-beta.887 74 1/27/2025
11.2.3-beta.883 69 1/27/2025
11.2.3-beta.876 72 1/26/2025
11.2.3-beta.874 73 1/26/2025
11.2.3-beta.866 64 1/24/2025
11.2.3-beta.862 62 1/24/2025
11.2.3-beta.860 65 1/23/2025
11.2.3-beta.849 71 1/23/2025
11.2.3-beta.845 73 1/23/2025
11.2.3-beta.841 68 1/22/2025
11.2.3-beta.838 68 1/20/2025
11.2.3-beta.826 66 1/19/2025
11.2.3-beta.819 61 1/18/2025
11.2.3-beta.802 66 1/17/2025
11.2.3-beta.798 59 1/17/2025
11.2.3-beta.793 57 1/17/2025
11.2.3-beta.789 60 1/17/2025
11.2.3-beta.784 58 1/16/2025
11.2.1-alpha-782 58 1/16/2025
11.2.1-alpha-770 62 1/15/2025
11.2.1-alpha-764 41 1/15/2025
11.2.1-alpha-756 55 1/14/2025
11.2.1-alpha-748 71 1/10/2025
11.2.1-alpha-713 70 1/6/2025
11.2.1-alpha-711 107 1/4/2025
11.2.1-alpha-709 99 1/4/2025
11.2.1-alpha-701 98 1/4/2025
11.2.1-alpha-698 99 1/3/2025
11.2.1-alpha-678 100 1/1/2025
11.2.1-alpha-668 71 12/26/2024
11.2.1-alpha-664 74 12/26/2024
11.2.1-alpha-661 73 12/26/2024
11.2.1-alpha-652 79 12/25/2024
11.2.1-alpha-648 71 12/25/2024
11.2.1-alpha-646 77 12/25/2024
11.2.1-alpha-631 76 12/24/2024
11.2.1-alpha-626 73 12/23/2024
11.2.1-alpha-614 73 12/23/2024
11.2.1-alpha-606 77 12/21/2024
11.2.1-alpha-604 81 12/20/2024
11.2.1-alpha-598 77 12/19/2024
11.2.1-alpha-595 88 12/17/2024
11.2.1-alpha-593 82 12/17/2024
11.2.1-alpha-579 91 12/15/2024
11.2.1-alpha-577 82 12/15/2024
11.2.1-alpha-574 82 12/15/2024
11.2.1-alpha-568 78 12/15/2024
11.2.1-alpha-559 79 12/14/2024
11.2.1-alpha-547 84 12/13/2024
11.2.1-alpha-545 85 12/13/2024
11.2.1-alpha-540 85 12/13/2024
11.2.1-alpha-538 81 12/13/2024
11.2.1-alpha-523 84 12/8/2024
11.2.1-alpha-517 79 12/8/2024