Consolonia.NUnit 11.2.3-beta.936

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.3-beta.936                
NuGet\Install-Package Consolonia.NUnit -Version 11.2.3-beta.936                
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.3-beta.936" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Consolonia.NUnit --version 11.2.3-beta.936                
#r "nuget: Consolonia.NUnit, 11.2.3-beta.936"                
#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.
// Install Consolonia.NUnit as a Cake Addin
#addin nuget:?package=Consolonia.NUnit&version=11.2.3-beta.936&prerelease

// Install Consolonia.NUnit as a Cake Tool
#tool nuget:?package=Consolonia.NUnit&version=11.2.3-beta.936&prerelease                

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. 
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.2.5-beta.1008 0 3/22/2025
11.2.5-beta.1004 0 3/21/2025
11.2.5-beta.988 37 3/15/2025
11.2.5-beta.965 53 3/1/2025
11.2.5-beta.959 46 2/28/2025
11.2.3-beta.954 56 2/27/2025
11.2.3-beta.946 50 2/24/2025
11.2.3-beta.936 47 2/7/2025
11.2.3-beta.920 51 2/6/2025
11.2.3-beta.906 51 2/2/2025
11.2.3-beta.902 58 2/1/2025
11.2.3-beta.887 50 1/27/2025
11.2.3-beta.883 44 1/27/2025
11.2.3-beta.876 50 1/26/2025
11.2.3-beta.874 48 1/26/2025
11.2.3-beta.866 41 1/24/2025
11.2.3-beta.862 40 1/24/2025
11.2.3-beta.860 46 1/23/2025
11.2.3-beta.849 49 1/23/2025
11.2.3-beta.845 52 1/23/2025
11.2.3-beta.841 47 1/22/2025
11.2.3-beta.838 47 1/20/2025
11.2.3-beta.826 40 1/19/2025
11.2.3-beta.819 40 1/18/2025
11.2.3-beta.802 40 1/17/2025
11.2.3-beta.798 39 1/17/2025
11.2.3-beta.793 37 1/17/2025
11.2.3-beta.789 40 1/17/2025
11.2.3-beta.784 39 1/16/2025
11.2.1-alpha-782 39 1/16/2025
11.2.1-alpha-770 39 1/15/2025
11.2.1-alpha-764 22 1/15/2025
11.2.1-alpha-756 34 1/14/2025
11.2.1-alpha-748 52 1/10/2025
11.2.1-alpha-713 50 1/6/2025
11.2.1-alpha-711 81 1/4/2025
11.2.1-alpha-709 77 1/4/2025
11.2.1-alpha-701 79 1/4/2025
11.2.1-alpha-698 79 1/3/2025
11.2.1-alpha-678 76 1/1/2025
11.2.1-alpha-668 53 12/26/2024
11.2.1-alpha-664 50 12/26/2024
11.2.1-alpha-661 53 12/26/2024
11.2.1-alpha-652 61 12/25/2024
11.2.1-alpha-648 52 12/25/2024
11.2.1-alpha-646 54 12/25/2024
11.2.1-alpha-631 54 12/24/2024
11.2.1-alpha-626 52 12/23/2024
11.2.1-alpha-614 52 12/23/2024
11.2.1-alpha-606 53 12/21/2024
11.2.1-alpha-604 54 12/20/2024
11.2.1-alpha-598 57 12/19/2024
11.2.1-alpha-595 66 12/17/2024
11.2.1-alpha-593 58 12/17/2024
11.2.1-alpha-579 66 12/15/2024
11.2.1-alpha-577 58 12/15/2024
11.2.1-alpha-574 55 12/15/2024
11.2.1-alpha-568 54 12/15/2024
11.2.1-alpha-559 55 12/14/2024
11.2.1-alpha-547 60 12/13/2024
11.2.1-alpha-545 61 12/13/2024
11.2.1-alpha-540 58 12/13/2024
11.2.1-alpha-538 57 12/13/2024
11.2.1-alpha-523 61 12/8/2024
11.2.1-alpha-517 60 12/8/2024