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 243 9/19/2025
8.0.564 245 9/19/2025
8.0.563 239 9/19/2025
8.0.562 251 9/19/2025
8.0.561 309 9/16/2025
8.0.560 298 9/16/2025
8.0.559 303 9/16/2025
8.0.558 308 9/16/2025
8.0.557 256 9/15/2025
8.0.556 253 9/15/2025
8.0.555 125 9/12/2025
8.0.554 170 9/11/2025
8.0.553 168 9/11/2025
8.0.552 177 9/11/2025
8.0.551 170 9/11/2025
8.0.550 156 9/11/2025
8.0.548 168 9/11/2025
8.0.547 166 9/11/2025
8.0.546 164 9/11/2025
8.0.545 160 9/11/2025
8.0.544 175 9/10/2025
8.0.543 175 9/10/2025
8.0.542 168 9/10/2025
8.0.541 173 9/10/2025
8.0.540 167 9/9/2025
8.0.539 167 9/9/2025
8.0.538 169 9/9/2025
8.0.537 166 9/9/2025
8.0.536 169 9/9/2025
8.0.535 165 9/9/2025
8.0.534 154 9/9/2025
8.0.533 171 9/9/2025
8.0.532 167 9/8/2025
8.0.531 151 9/5/2025
8.0.530 177 9/4/2025
8.0.529 176 9/4/2025
8.0.528 176 9/4/2025
8.0.527 181 9/4/2025
8.0.526 189 9/3/2025
8.0.525 162 9/2/2025
8.0.524 169 9/2/2025
8.0.523 157 9/2/2025
8.0.522 218 8/28/2025
8.0.521 219 8/27/2025
8.0.520 215 8/27/2025
8.0.519 210 8/27/2025
8.0.518 218 8/27/2025
8.0.517 188 8/25/2025
8.0.516 307 8/25/2025
8.0.515 234 8/24/2025
8.0.514 165 8/21/2025
8.0.513 169 8/20/2025
8.0.512 161 8/20/2025
8.0.511 163 8/20/2025
8.0.510 154 8/18/2025
8.0.509 162 8/18/2025
8.0.508 167 8/13/2025
8.0.505 171 8/13/2025
8.0.504 171 8/13/2025
8.0.503 169 8/13/2025
8.0.502 171 8/12/2025
8.0.501 171 8/12/2025
8.0.500 164 8/12/2025
8.0.499 174 8/12/2025
8.0.498 163 8/11/2025
8.0.497 203 8/8/2025
8.0.496 212 8/8/2025
8.0.495 208 8/8/2025
8.0.494 225 8/8/2025
8.0.493 239 8/7/2025
8.0.492 243 8/7/2025
8.0.491 243 8/7/2025
8.0.490 246 8/7/2025
8.0.489 252 8/5/2025
8.0.488 251 8/5/2025
8.0.487 101 8/1/2025
8.0.486 121 7/30/2025
8.0.485 159 7/28/2025
8.0.484 146 7/28/2025
8.0.483 151 7/28/2025
8.0.482 147 7/28/2025
8.0.481 136 7/28/2025
8.0.480 407 7/25/2025
8.0.479 434 7/25/2025
8.0.478 441 7/25/2025
8.0.477 446 7/25/2025
8.0.476 442 7/25/2025
8.0.475 499 7/24/2025
8.0.474 506 7/24/2025
8.0.473 545 7/23/2025
8.0.472 547 7/23/2025
8.0.470 553 7/23/2025
8.0.469 537 7/23/2025
8.0.468 549 7/23/2025
8.0.467 546 7/23/2025
8.0.466 555 7/23/2025
8.0.465 545 7/23/2025
8.0.464 544 7/23/2025
8.0.463 551 7/23/2025
8.0.462 546 7/22/2025
8.0.461 543 7/22/2025
8.0.460 441 7/21/2025
8.0.459 119 7/18/2025
8.0.458 130 7/18/2025
8.0.457 163 7/17/2025
8.0.456 164 7/17/2025
8.0.455 163 7/17/2025
8.0.454 164 7/17/2025
8.0.453 164 7/17/2025
8.0.451 155 7/17/2025
8.0.450 162 7/17/2025
8.0.449 162 7/17/2025
8.0.448 166 7/17/2025
8.0.447 159 7/16/2025
8.0.446 162 7/16/2025
8.0.445 166 7/16/2025
8.0.444 152 7/16/2025
8.0.443 168 7/16/2025
8.0.442 151 7/16/2025
8.0.438 163 7/15/2025
8.0.437 161 7/15/2025
8.0.436 166 7/15/2025
8.0.435 166 7/15/2025
8.0.433 160 7/14/2025
8.0.432 162 7/14/2025
8.0.431 150 7/11/2025
8.0.430 153 7/11/2025
8.0.429 173 7/10/2025
8.0.428 167 7/10/2025
8.0.427 169 7/9/2025
8.0.426 180 7/8/2025
8.0.425 161 7/8/2025
8.0.424 167 7/8/2025
8.0.423 169 7/8/2025
8.0.422 165 7/8/2025
8.0.421 167 7/8/2025
8.0.420 168 7/7/2025
8.0.419 170 7/7/2025
8.0.418 170 7/7/2025
8.0.417 164 7/7/2025
8.0.416 169 7/6/2025
8.0.415 130 7/4/2025
8.0.414 137 7/4/2025
8.0.411 172 7/3/2025
8.0.410 171 7/3/2025
6.0.565 230 9/19/2025
6.0.564 238 9/19/2025
6.0.563 247 9/19/2025
6.0.562 251 9/19/2025
6.0.561 302 9/16/2025
6.0.560 301 9/16/2025
6.0.559 298 9/16/2025
6.0.558 299 9/16/2025
6.0.557 241 9/15/2025
6.0.556 248 9/15/2025
6.0.555 119 9/12/2025
6.0.554 167 9/11/2025
6.0.553 169 9/11/2025
6.0.552 163 9/11/2025
6.0.551 168 9/11/2025
6.0.550 164 9/11/2025
6.0.548 166 9/11/2025
6.0.547 167 9/11/2025
6.0.546 177 9/11/2025
6.0.545 169 9/11/2025
6.0.544 169 9/10/2025
6.0.543 170 9/10/2025
6.0.542 159 9/10/2025
6.0.541 174 9/10/2025
6.0.540 167 9/9/2025
6.0.539 166 9/9/2025
6.0.538 164 9/9/2025
6.0.537 168 9/9/2025
6.0.536 170 9/9/2025
6.0.535 162 9/9/2025
6.0.534 163 9/9/2025
6.0.533 157 9/9/2025
6.0.532 163 9/8/2025
6.0.531 140 9/5/2025
6.0.530 177 9/4/2025
6.0.529 177 9/4/2025
6.0.528 181 9/4/2025
6.0.527 179 9/4/2025
6.0.526 168 9/3/2025
6.0.525 162 9/2/2025
6.0.524 155 9/2/2025
6.0.523 163 9/2/2025
6.0.522 215 8/28/2025
6.0.521 207 8/27/2025
6.0.520 213 8/27/2025
6.0.519 216 8/27/2025
6.0.518 214 8/27/2025
6.0.517 186 8/25/2025
6.0.516 307 8/25/2025
6.0.515 229 8/24/2025
6.0.514 162 8/21/2025
6.0.513 164 8/20/2025
6.0.512 163 8/20/2025
6.0.511 164 8/20/2025
6.0.510 162 8/18/2025
6.0.509 151 8/18/2025
6.0.508 165 8/13/2025
6.0.505 168 8/13/2025
6.0.504 168 8/13/2025
6.0.503 167 8/13/2025
6.0.502 168 8/12/2025
6.0.501 166 8/12/2025
6.0.500 171 8/12/2025
6.0.499 169 8/12/2025
6.0.498 161 8/11/2025
6.0.497 202 8/8/2025
6.0.496 214 8/8/2025
6.0.495 210 8/8/2025
6.0.494 234 8/8/2025
6.0.493 238 8/7/2025
6.0.492 245 8/7/2025
6.0.491 239 8/7/2025
6.0.490 247 8/7/2025
6.0.489 252 8/5/2025
6.0.488 252 8/5/2025
6.0.487 94 8/1/2025
6.0.486 125 7/30/2025
6.0.485 148 7/28/2025
6.0.484 146 7/28/2025
6.0.483 144 7/28/2025
6.0.482 147 7/28/2025
6.0.481 147 7/28/2025
6.0.480 406 7/25/2025
6.0.479 428 7/25/2025
6.0.478 436 7/25/2025
6.0.477 421 7/25/2025
6.0.476 445 7/25/2025
6.0.475 495 7/24/2025
6.0.474 497 7/24/2025
6.0.473 546 7/23/2025
6.0.472 547 7/23/2025
6.0.470 543 7/23/2025
6.0.469 542 7/23/2025
6.0.468 545 7/23/2025
6.0.467 542 7/23/2025
6.0.466 546 7/23/2025
6.0.465 548 7/23/2025
6.0.464 543 7/23/2025
6.0.463 547 7/23/2025
6.0.462 539 7/22/2025
6.0.461 540 7/22/2025
6.0.460 434 7/21/2025
6.0.459 114 7/18/2025
6.0.458 128 7/18/2025
6.0.457 157 7/17/2025
6.0.456 159 7/17/2025
6.0.455 162 7/17/2025
6.0.454 163 7/17/2025
6.0.453 160 7/17/2025
6.0.451 157 7/17/2025
6.0.450 153 7/17/2025
6.0.449 163 7/17/2025
6.0.448 155 7/17/2025
6.0.447 155 7/16/2025
6.0.446 160 7/16/2025
6.0.445 154 7/16/2025
6.0.444 163 7/16/2025
6.0.443 161 7/16/2025
6.0.442 164 7/16/2025
6.0.438 159 7/15/2025
6.0.437 161 7/15/2025
6.0.436 151 7/15/2025
6.0.435 164 7/15/2025
6.0.433 154 7/14/2025
6.0.432 165 7/14/2025
6.0.431 134 7/11/2025
6.0.430 153 7/11/2025
6.0.429 167 7/10/2025
6.0.428 167 7/10/2025
6.0.427 159 7/9/2025
6.0.426 172 7/8/2025
6.0.425 163 7/8/2025
6.0.424 162 7/8/2025
6.0.423 169 7/8/2025
6.0.422 165 7/8/2025
6.0.421 170 7/8/2025
6.0.420 168 7/7/2025
6.0.419 165 7/7/2025
6.0.418 164 7/7/2025
6.0.417 166 7/7/2025
6.0.416 166 7/6/2025
6.0.415 121 7/4/2025
6.0.414 142 7/4/2025
6.0.411 173 7/3/2025
6.0.410 171 7/3/2025