TestTale 1.1.2

dotnet add package TestTale --version 1.1.2
                    
NuGet\Install-Package TestTale -Version 1.1.2
                    
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="TestTale" Version="1.1.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TestTale" Version="1.1.2" />
                    
Directory.Packages.props
<PackageReference Include="TestTale" />
                    
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 TestTale --version 1.1.2
                    
#r "nuget: TestTale, 1.1.2"
                    
#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 TestTale@1.1.2
                    
#: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=TestTale&version=1.1.2
                    
Install as a Cake Addin
#tool nuget:?package=TestTale&version=1.1.2
                    
Install as a Cake Tool

TestTale

What purpose does it serve?

Has it ever happened to you that you want to understand the main point by looking at the tests, but it takes some time to understand what's going on in it?

If it is true, it would be great to filter the code from unnecessary details and leave the most important information for understanding the purpose of the code. It is similar to our discussions. You don't tell absolutely all the details in your story. For example, you talk about your weekend. You say something like this: "I spent the weekend travelling by the sea. The weather was warm and sunny, we rented a boat and went to the island". Are there any unnecessary details? No, your tell only as much as was necessary to understand your story, you don't tell what you had for breakfast or whether you took a shower. It was part of your weekend, but not the main point of your story. If you start talking about everything that happend to you over the weekend, it will take a long time, and the listener will get tired of listening.

The same things happens in the code. By the project you can emphasize the main point of the tests, trying to describe what you are testing without unnecessary details

Look at the next examples.
The first example expose all of the details and it took some time to understand it.

    [Fact]
    public async Task Successful_metric_shoud_be_sent()
    {
        Mock<IWeatherForecastRepository> forecastRepositoryMock = new();
        Mock<ILogger<ForecastProvider>> loggerMock = new();
        Mock<IForecastMetricsHandler> forecastMetricsHandlerMock = new();
        ForecastProvider sut = new(
            forecastRepositoryMock.Object,
            loggerMock.Object,
            forecastMetricsHandlerMock.Object);

        WeatherForecast returnedWeatherForecast = new()
        {
            Date = default,
            TimeOfDay = default,
            Region= new Region()
            {
                Id = 1,
                Name = "London"
            },
            Summary = "Sunny",
            TemperatureC = 22
        };

        forecastRepositoryMock
            .Setup(x => x.GetWeatherForecast(
                It.IsAny<int>(),
                It.IsAny<DateRequest>(),
                It.IsAny<TimeOfDay>()))
            .ReturnsAsync(returnedWeatherForecast);

        var result = await sut.ProvideForecastAsync(It.IsAny<int>(), It.IsAny<DateRequest>(), It.IsAny<TimeOfDay>());

        forecastMetricsHandlerMock.Verify(x => x.IncreaseSuccessfulProvidedForecast(), Times.Once);
    }

The second example tests the same functionality but all the details are not disclosed, and only the main thing remains.

    [Fact]
    public async Task Successful_metric_shoud_be_sent()
    {
        await TestClient
            .Attempts(new GetForecast())
            .Using(new ForecastProviderDependencies())
            .WithAnyParameters()
            .WithSituation(new WhenProvidedForecastIsNotNull())
            .Then(new SeeSuccessfulMetric())
            .RunAsync();
    }

I hope that it will be much more convinient to read the second example, because it explains step by step how the test is configured and what is you expect from passing the test. Another advantage is that this code can be understood not only by programmers but also by business people.

More examples you can find in the link below: https://github.com/AleeexWind/TestTale.Examples/tree/master/ForecastTests

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.
  • net8.0

    • No dependencies.

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
1.1.2 122 1/8/2026
1.1.1 112 1/7/2026
1.1.0 113 1/4/2026
1.0.4 119 1/4/2026
1.0.0 111 1/4/2026