MDAT 1.0.0-beta7

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

Code Coverage

mdAT - Markdown Auto-Tests

mdAT is a simple library that replaces unit and integration tests. With mdAT, developers can write unit tests in the traditional way, but without the need to add many test data from JSON, XML, YAML files, or use manual [InlideData] with escaped JSON object.

To use mdAT, follow these steps:

  1. Create a normal MSTestV2 with [TestClass], [TestMethod].
  2. Code your unit test in the traditional way using Moq, if needed, then call your method you want to test.
  3. Add all your desired parameters to your test method, theses will be exposed to be replaced by mdAT markdown test file.
  4. Add [MarkdownTest("~/Tests/{method}.md")] with your Tests folder as cases repository (let it being empty in first place).
  5. Ensure to surround your tested method with Verify.Assert(), it will automatically validate the JSON expected result, even if it is an exception.
  6. Your .md test file will be autogenerated during the first run.
  7. Edit your .md file as you wish.
  8. Enjoy!
[TestClass]
public class Calc
{
    [TestMethod]
    [MarkdownTest("~/Tests/{method}.md")]
    public async Task Add(int val1, int val2, string expected)
    {
        _ = await Verify.Assert(() => Task.FromResult(Add(val1, val2)), expected);
    }

    // Fake usecase
    public static int Add(int val1, int val2)
    {
        return val1 + val2;
    }
}

All test cases can be stored in a single markdown file:

# Test Add method

Simple test case for addition tests.

## Case 1

Let's try simple `1 + 1` expected to return `2`

``````yaml
val1: 1
val2: 1
expected: 2
``````

## Case 2
``````yaml
val1: 212
val2: 2444
expected: 2656
``````

Using mdAT, analysts and developers can work together with a unique source of tests, and maintainers can edit and validate all tests locally or on a build server.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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
1.4.1 170 12/3/2024
1.4.0 129 12/1/2024
1.3.1 511 4/20/2024
1.3.0 159 4/20/2024
1.2.4 238 9/28/2023
1.2.3 159 9/28/2023
1.2.2 185 9/23/2023
1.2.1 190 9/8/2023
1.2.0 253 6/15/2023
1.1.6 242 5/29/2023
1.1.5 231 5/19/2023
1.1.4 224 5/11/2023
1.1.3 238 5/11/2023
1.1.2 253 5/5/2023
1.1.1 261 4/25/2023
1.1.0 252 4/25/2023
1.0.0 266 4/21/2023
1.0.0-rc7 207 4/21/2023
1.0.0-rc6 200 4/20/2023
1.0.0-rc4 185 4/20/2023
1.0.0-rc3 200 4/20/2023
1.0.0-rc2 200 4/19/2023
1.0.0-rc1 196 4/16/2023
1.0.0-beta7 204 4/14/2023
1.0.0-beta6 212 4/14/2023
1.0.0-beta5 203 4/14/2023
1.0.0-beta4 207 4/5/2023
1.0.0-beta3 195 4/5/2023
1.0.0-beta2 200 4/3/2023
1.0.0-beta1 182 4/3/2023