Reo.Core.Testing.CodeGeneration 8.0.565

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

Генератор тестовых билдеров для доменных моделей

Описание пакета

Reo.Core.Testing.CodeGeneration — это библиотека для генерации тестовых билдеров доменных моделей.

Основные компоненты

  1. ITestingBuilderFor<TModel> Маркерный интерфейс для partial классов, которые используются для создания билдеров доменных моделей. TModel - тип доменной модели.

Требования

Установка

Используйте следующие команды для установки пакета:

# NuGet Package Manager
Install-Package Reo.Core.Testing.CodeGeneration

# .NET CLI
dotnet add package Reo.Core.Testing.CodeGeneration

Настройка

Создание класса тестового билдера

public partial class MyModelTestBuilder : ITestingBuilderFor<MyModel>;

Доменный класс:

public class MyModel
{
	private MyModel(string? name)
	{
		Name = name;
	}

	public string? Name { get; set; }


	public static MyModel Create(string? name)
	{
		var result = new MyModel(name);

		return result;
	}
}

Сгенерированный класс с методами:

public partial class MyModelTestBuilder
{
	private string? Name { get;  set;  }

	public MyModelTestBuilder WithName(string name)
	{
		Name = name;

		return this;
	}

	public MyModelTestBuilder WithNameAsNull()
	{
		Name = null;

		return this;
	}

	public MyModel CreateMyModel() => MyModel.Create(Name);
}

Написание теста:

public class MyModelTests
{
	private readonly AutoMocker _mocker = new();

	private readonly MyModelTestBuilder _builder;

	public MyModelTests() => _builder = _mocker.Get<MyModelTestBuilder>();

	[Fact(DisplayName = "Наименование может быть не задано")]
	public void Test1()
	{
		// Arrange
		_builder.WithNameAsNull();

		// Act
		var result = _builder.CreateMyModel();

		// Assert

		result.Name.Should()
			.BeNull();
	}
}

Лицензия

Reo.Core.Testing распространяется под лицензией MIT. См. файл LICENSE для деталей.

There are no supported framework assets in this 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
8.0.565 238 9/19/2025
8.0.564 239 9/19/2025
8.0.563 234 9/19/2025
8.0.562 247 9/19/2025
8.0.561 303 9/16/2025
8.0.560 292 9/16/2025
8.0.559 297 9/16/2025
8.0.558 303 9/16/2025
8.0.557 251 9/15/2025
8.0.556 248 9/15/2025
8.0.555 121 9/12/2025
8.0.554 163 9/11/2025
8.0.553 163 9/11/2025
8.0.552 173 9/11/2025
8.0.551 164 9/11/2025
8.0.550 152 9/11/2025
8.0.548 164 9/11/2025
8.0.547 161 9/11/2025
8.0.546 160 9/11/2025
8.0.545 156 9/11/2025
8.0.544 168 9/10/2025
8.0.543 170 9/10/2025
8.0.542 163 9/10/2025
8.0.541 167 9/10/2025
8.0.540 164 9/9/2025
8.0.539 163 9/9/2025
8.0.538 165 9/9/2025
8.0.537 162 9/9/2025
8.0.536 165 9/9/2025
8.0.535 161 9/9/2025
8.0.534 151 9/9/2025
8.0.533 166 9/9/2025
8.0.532 161 9/8/2025
8.0.531 146 9/5/2025
8.0.530 173 9/4/2025
8.0.529 172 9/4/2025
8.0.528 173 9/4/2025
8.0.527 174 9/4/2025
8.0.526 181 9/3/2025
8.0.525 156 9/2/2025
8.0.524 165 9/2/2025
8.0.523 153 9/2/2025
8.0.522 214 8/28/2025
8.0.521 214 8/27/2025
8.0.520 211 8/27/2025
8.0.519 206 8/27/2025
8.0.518 214 8/27/2025
8.0.517 182 8/25/2025
8.0.516 303 8/25/2025
8.0.515 230 8/24/2025
8.0.514 159 8/21/2025
8.0.513 164 8/20/2025
8.0.512 158 8/20/2025
8.0.511 160 8/20/2025
8.0.510 151 8/18/2025
8.0.509 159 8/18/2025
8.0.508 164 8/13/2025
8.0.505 168 8/13/2025
8.0.504 168 8/13/2025
8.0.503 165 8/13/2025
8.0.502 167 8/12/2025
8.0.501 168 8/12/2025
8.0.500 161 8/12/2025
8.0.499 171 8/12/2025
8.0.498 160 8/11/2025
8.0.497 200 8/8/2025
8.0.496 207 8/8/2025
8.0.495 203 8/8/2025
8.0.494 222 8/8/2025
8.0.493 236 8/7/2025
8.0.492 240 8/7/2025
8.0.491 240 8/7/2025
8.0.490 243 8/7/2025
8.0.489 247 8/5/2025
8.0.488 248 8/5/2025
8.0.487 96 8/1/2025
8.0.486 117 7/30/2025
8.0.485 156 7/28/2025
8.0.484 143 7/28/2025
8.0.483 145 7/28/2025
8.0.482 144 7/28/2025
8.0.481 133 7/28/2025
8.0.480 402 7/25/2025
8.0.479 430 7/25/2025
8.0.478 437 7/25/2025
8.0.477 443 7/25/2025
8.0.476 437 7/25/2025
8.0.475 496 7/24/2025
8.0.474 503 7/24/2025
8.0.473 540 7/23/2025
8.0.472 543 7/23/2025
8.0.470 548 7/23/2025
8.0.469 534 7/23/2025
8.0.468 542 7/23/2025
8.0.467 543 7/23/2025
8.0.466 552 7/23/2025
8.0.465 542 7/23/2025
8.0.464 541 7/23/2025
8.0.463 547 7/23/2025
8.0.462 543 7/22/2025
8.0.461 540 7/22/2025
8.0.460 438 7/21/2025
8.0.459 116 7/18/2025
8.0.458 127 7/18/2025
8.0.457 160 7/17/2025
8.0.456 159 7/17/2025
8.0.455 160 7/17/2025
8.0.454 161 7/17/2025
8.0.453 159 7/17/2025
8.0.451 152 7/17/2025
8.0.450 157 7/17/2025
8.0.449 159 7/17/2025
8.0.448 163 7/17/2025
8.0.447 155 7/16/2025
8.0.446 159 7/16/2025
8.0.445 163 7/16/2025
8.0.444 148 7/16/2025
8.0.443 165 7/16/2025
8.0.442 148 7/16/2025
8.0.438 160 7/15/2025
8.0.437 158 7/15/2025
8.0.436 162 7/15/2025
8.0.435 163 7/15/2025
8.0.433 156 7/14/2025
8.0.432 158 7/14/2025
8.0.431 147 7/11/2025
8.0.430 150 7/11/2025
8.0.429 167 7/10/2025
8.0.428 163 7/10/2025
8.0.427 165 7/9/2025
8.0.426 176 7/8/2025
8.0.425 158 7/8/2025
8.0.424 164 7/8/2025
8.0.423 165 7/8/2025
8.0.422 162 7/8/2025
8.0.421 164 7/8/2025
8.0.420 164 7/7/2025
8.0.419 165 7/7/2025
8.0.418 164 7/7/2025
8.0.417 160 7/7/2025
8.0.416 163 7/6/2025
8.0.415 126 7/4/2025
8.0.414 132 7/4/2025
8.0.411 168 7/3/2025
8.0.410 168 7/3/2025
6.0.565 226 9/19/2025
6.0.564 233 9/19/2025
6.0.563 240 9/19/2025
6.0.562 246 9/19/2025
6.0.561 297 9/16/2025
6.0.560 293 9/16/2025
6.0.559 291 9/16/2025
6.0.558 293 9/16/2025
6.0.557 237 9/15/2025
6.0.556 244 9/15/2025
6.0.555 114 9/12/2025
6.0.554 162 9/11/2025
6.0.553 163 9/11/2025
6.0.552 156 9/11/2025
6.0.551 162 9/11/2025
6.0.550 159 9/11/2025
6.0.548 161 9/11/2025
6.0.547 162 9/11/2025
6.0.546 172 9/11/2025
6.0.545 162 9/11/2025
6.0.544 163 9/10/2025
6.0.543 165 9/10/2025
6.0.542 154 9/10/2025
6.0.541 164 9/10/2025
6.0.540 161 9/9/2025
6.0.539 162 9/9/2025
6.0.538 160 9/9/2025
6.0.537 164 9/9/2025
6.0.536 166 9/9/2025
6.0.535 157 9/9/2025
6.0.534 159 9/9/2025
6.0.533 153 9/9/2025
6.0.532 159 9/8/2025
6.0.531 136 9/5/2025
6.0.530 173 9/4/2025
6.0.529 174 9/4/2025
6.0.528 177 9/4/2025
6.0.527 172 9/4/2025
6.0.526 162 9/3/2025
6.0.525 158 9/2/2025
6.0.524 151 9/2/2025
6.0.523 159 9/2/2025
6.0.522 211 8/28/2025
6.0.521 203 8/27/2025
6.0.520 209 8/27/2025
6.0.519 206 8/27/2025
6.0.518 210 8/27/2025
6.0.517 182 8/25/2025
6.0.516 303 8/25/2025
6.0.515 225 8/24/2025
6.0.514 159 8/21/2025
6.0.513 161 8/20/2025
6.0.512 158 8/20/2025
6.0.511 161 8/20/2025
6.0.510 159 8/18/2025
6.0.509 148 8/18/2025
6.0.508 162 8/13/2025
6.0.505 164 8/13/2025
6.0.504 165 8/13/2025
6.0.503 164 8/13/2025
6.0.502 165 8/12/2025
6.0.501 162 8/12/2025
6.0.500 166 8/12/2025
6.0.499 165 8/12/2025
6.0.498 158 8/11/2025
6.0.497 199 8/8/2025
6.0.496 209 8/8/2025
6.0.495 204 8/8/2025
6.0.494 231 8/8/2025
6.0.493 234 8/7/2025
6.0.492 240 8/7/2025
6.0.491 235 8/7/2025
6.0.490 244 8/7/2025
6.0.489 248 8/5/2025
6.0.488 246 8/5/2025
6.0.487 90 8/1/2025
6.0.486 121 7/30/2025
6.0.485 145 7/28/2025
6.0.484 141 7/28/2025
6.0.483 141 7/28/2025
6.0.482 143 7/28/2025
6.0.481 144 7/28/2025
6.0.480 402 7/25/2025
6.0.479 425 7/25/2025
6.0.478 432 7/25/2025
6.0.477 418 7/25/2025
6.0.476 442 7/25/2025
6.0.475 492 7/24/2025
6.0.474 493 7/24/2025
6.0.473 543 7/23/2025
6.0.472 542 7/23/2025
6.0.470 540 7/23/2025
6.0.469 539 7/23/2025
6.0.468 542 7/23/2025
6.0.467 539 7/23/2025
6.0.466 543 7/23/2025
6.0.465 541 7/23/2025
6.0.464 540 7/23/2025
6.0.463 544 7/23/2025
6.0.462 535 7/22/2025
6.0.461 537 7/22/2025
6.0.460 431 7/21/2025
6.0.459 110 7/18/2025
6.0.458 125 7/18/2025
6.0.457 154 7/17/2025
6.0.456 155 7/17/2025
6.0.455 157 7/17/2025
6.0.454 157 7/17/2025
6.0.453 155 7/17/2025
6.0.451 154 7/17/2025
6.0.450 150 7/17/2025
6.0.449 160 7/17/2025
6.0.448 152 7/17/2025
6.0.447 152 7/16/2025
6.0.446 157 7/16/2025
6.0.445 151 7/16/2025
6.0.444 159 7/16/2025
6.0.443 158 7/16/2025
6.0.442 161 7/16/2025
6.0.438 156 7/15/2025
6.0.437 158 7/15/2025
6.0.436 148 7/15/2025
6.0.435 160 7/15/2025
6.0.433 151 7/14/2025
6.0.432 161 7/14/2025
6.0.431 130 7/11/2025
6.0.430 149 7/11/2025
6.0.429 163 7/10/2025
6.0.428 164 7/10/2025
6.0.427 156 7/9/2025
6.0.426 168 7/8/2025
6.0.425 157 7/8/2025
6.0.424 159 7/8/2025
6.0.423 166 7/8/2025
6.0.422 161 7/8/2025
6.0.421 166 7/8/2025
6.0.420 163 7/7/2025
6.0.419 161 7/7/2025
6.0.418 160 7/7/2025
6.0.417 163 7/7/2025
6.0.416 162 7/6/2025
6.0.415 117 7/4/2025
6.0.414 138 7/4/2025
6.0.411 170 7/3/2025
6.0.410 168 7/3/2025