Reo.Core.Testing.CodeGeneration 6.0.512

There is a newer version of this package available.
See the version list below for details.
dotnet add package Reo.Core.Testing.CodeGeneration --version 6.0.512
                    
NuGet\Install-Package Reo.Core.Testing.CodeGeneration -Version 6.0.512
                    
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="6.0.512" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Reo.Core.Testing.CodeGeneration" Version="6.0.512" />
                    
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 6.0.512
                    
#r "nuget: Reo.Core.Testing.CodeGeneration, 6.0.512"
                    
#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@6.0.512
                    
#: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=6.0.512
                    
Install as a Cake Addin
#tool nuget:?package=Reo.Core.Testing.CodeGeneration&version=6.0.512
                    
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 240 9/19/2025
8.0.564 240 9/19/2025
8.0.563 236 9/19/2025
8.0.562 248 9/19/2025
8.0.561 305 9/16/2025
8.0.560 293 9/16/2025
8.0.559 299 9/16/2025
8.0.558 304 9/16/2025
8.0.557 253 9/15/2025
8.0.556 249 9/15/2025
8.0.555 123 9/12/2025
8.0.554 165 9/11/2025
8.0.553 166 9/11/2025
8.0.552 175 9/11/2025
8.0.551 166 9/11/2025
8.0.550 154 9/11/2025
8.0.548 166 9/11/2025
8.0.547 164 9/11/2025
8.0.546 162 9/11/2025
8.0.545 158 9/11/2025
8.0.544 170 9/10/2025
8.0.543 172 9/10/2025
8.0.542 166 9/10/2025
8.0.541 169 9/10/2025
8.0.540 166 9/9/2025
8.0.539 165 9/9/2025
8.0.538 167 9/9/2025
8.0.537 164 9/9/2025
8.0.536 167 9/9/2025
8.0.535 163 9/9/2025
8.0.534 153 9/9/2025
8.0.533 168 9/9/2025
8.0.532 163 9/8/2025
8.0.531 148 9/5/2025
8.0.530 174 9/4/2025
8.0.529 173 9/4/2025
8.0.528 175 9/4/2025
8.0.527 176 9/4/2025
8.0.526 182 9/3/2025
8.0.525 157 9/2/2025
8.0.524 166 9/2/2025
8.0.523 154 9/2/2025
8.0.522 215 8/28/2025
8.0.521 216 8/27/2025
8.0.520 213 8/27/2025
8.0.519 208 8/27/2025
8.0.518 216 8/27/2025
8.0.517 184 8/25/2025
8.0.516 304 8/25/2025
8.0.515 231 8/24/2025
8.0.514 161 8/21/2025
8.0.513 166 8/20/2025
8.0.512 160 8/20/2025
8.0.511 162 8/20/2025
8.0.510 153 8/18/2025
8.0.509 161 8/18/2025
8.0.508 166 8/13/2025
8.0.505 170 8/13/2025
8.0.504 170 8/13/2025
8.0.503 167 8/13/2025
8.0.502 169 8/12/2025
8.0.501 170 8/12/2025
8.0.500 163 8/12/2025
8.0.499 173 8/12/2025
8.0.498 162 8/11/2025
8.0.497 202 8/8/2025
8.0.496 209 8/8/2025
8.0.495 206 8/8/2025
8.0.494 224 8/8/2025
8.0.493 238 8/7/2025
8.0.492 242 8/7/2025
8.0.491 242 8/7/2025
8.0.490 245 8/7/2025
8.0.489 249 8/5/2025
8.0.488 250 8/5/2025
8.0.487 98 8/1/2025
8.0.486 119 7/30/2025
8.0.485 158 7/28/2025
8.0.484 145 7/28/2025
8.0.483 147 7/28/2025
8.0.482 146 7/28/2025
8.0.481 135 7/28/2025
8.0.480 404 7/25/2025
8.0.479 432 7/25/2025
8.0.478 439 7/25/2025
8.0.477 445 7/25/2025
8.0.476 439 7/25/2025
8.0.475 498 7/24/2025
8.0.474 505 7/24/2025
8.0.473 542 7/23/2025
8.0.472 545 7/23/2025
8.0.470 550 7/23/2025
8.0.469 536 7/23/2025
8.0.468 544 7/23/2025
8.0.467 545 7/23/2025
8.0.466 554 7/23/2025
8.0.465 544 7/23/2025
8.0.464 543 7/23/2025
8.0.463 549 7/23/2025
8.0.462 545 7/22/2025
8.0.461 542 7/22/2025
8.0.460 440 7/21/2025
8.0.459 118 7/18/2025
8.0.458 129 7/18/2025
8.0.457 162 7/17/2025
8.0.456 161 7/17/2025
8.0.455 162 7/17/2025
8.0.454 163 7/17/2025
8.0.453 161 7/17/2025
8.0.451 154 7/17/2025
8.0.450 159 7/17/2025
8.0.449 161 7/17/2025
8.0.448 165 7/17/2025
8.0.447 157 7/16/2025
8.0.446 161 7/16/2025
8.0.445 165 7/16/2025
8.0.444 150 7/16/2025
8.0.443 167 7/16/2025
8.0.442 150 7/16/2025
8.0.438 162 7/15/2025
8.0.437 160 7/15/2025
8.0.436 164 7/15/2025
8.0.435 165 7/15/2025
8.0.433 159 7/14/2025
8.0.432 160 7/14/2025
8.0.431 149 7/11/2025
8.0.430 152 7/11/2025
8.0.429 169 7/10/2025
8.0.428 166 7/10/2025
8.0.427 168 7/9/2025
8.0.426 179 7/8/2025
8.0.425 160 7/8/2025
8.0.424 166 7/8/2025
8.0.423 168 7/8/2025
8.0.422 164 7/8/2025
8.0.421 166 7/8/2025
8.0.420 167 7/7/2025
8.0.419 167 7/7/2025
8.0.418 167 7/7/2025
8.0.417 162 7/7/2025
8.0.416 166 7/6/2025
8.0.415 129 7/4/2025
8.0.414 136 7/4/2025
8.0.411 171 7/3/2025
8.0.410 170 7/3/2025
6.0.565 227 9/19/2025
6.0.564 235 9/19/2025
6.0.563 242 9/19/2025
6.0.562 248 9/19/2025
6.0.561 298 9/16/2025
6.0.560 295 9/16/2025
6.0.559 293 9/16/2025
6.0.558 295 9/16/2025
6.0.557 238 9/15/2025
6.0.556 245 9/15/2025
6.0.555 116 9/12/2025
6.0.554 164 9/11/2025
6.0.553 166 9/11/2025
6.0.552 158 9/11/2025
6.0.551 164 9/11/2025
6.0.550 161 9/11/2025
6.0.548 163 9/11/2025
6.0.547 165 9/11/2025
6.0.546 174 9/11/2025
6.0.545 164 9/11/2025
6.0.544 165 9/10/2025
6.0.543 168 9/10/2025
6.0.542 156 9/10/2025
6.0.541 167 9/10/2025
6.0.540 163 9/9/2025
6.0.539 164 9/9/2025
6.0.538 162 9/9/2025
6.0.537 166 9/9/2025
6.0.536 168 9/9/2025
6.0.535 159 9/9/2025
6.0.534 161 9/9/2025
6.0.533 155 9/9/2025
6.0.532 161 9/8/2025
6.0.531 137 9/5/2025
6.0.530 174 9/4/2025
6.0.529 175 9/4/2025
6.0.528 179 9/4/2025
6.0.527 174 9/4/2025
6.0.526 163 9/3/2025
6.0.525 159 9/2/2025
6.0.524 152 9/2/2025
6.0.523 160 9/2/2025
6.0.522 212 8/28/2025
6.0.521 205 8/27/2025
6.0.520 211 8/27/2025
6.0.519 208 8/27/2025
6.0.518 212 8/27/2025
6.0.517 184 8/25/2025
6.0.516 304 8/25/2025
6.0.515 226 8/24/2025
6.0.514 161 8/21/2025
6.0.513 163 8/20/2025
6.0.512 160 8/20/2025
6.0.511 163 8/20/2025
6.0.510 161 8/18/2025
6.0.509 150 8/18/2025
6.0.508 164 8/13/2025
6.0.505 167 8/13/2025
6.0.504 167 8/13/2025
6.0.503 166 8/13/2025
6.0.502 167 8/12/2025
6.0.501 164 8/12/2025
6.0.500 168 8/12/2025
6.0.499 167 8/12/2025
6.0.498 160 8/11/2025
6.0.497 201 8/8/2025
6.0.496 211 8/8/2025
6.0.495 206 8/8/2025
6.0.494 233 8/8/2025
6.0.493 236 8/7/2025
6.0.492 242 8/7/2025
6.0.491 237 8/7/2025
6.0.490 246 8/7/2025
6.0.489 250 8/5/2025
6.0.488 248 8/5/2025
6.0.487 92 8/1/2025
6.0.486 124 7/30/2025
6.0.485 147 7/28/2025
6.0.484 143 7/28/2025
6.0.483 143 7/28/2025
6.0.482 145 7/28/2025
6.0.481 146 7/28/2025
6.0.480 404 7/25/2025
6.0.479 427 7/25/2025
6.0.478 434 7/25/2025
6.0.477 420 7/25/2025
6.0.476 444 7/25/2025
6.0.475 494 7/24/2025
6.0.474 495 7/24/2025
6.0.473 545 7/23/2025
6.0.472 544 7/23/2025
6.0.470 542 7/23/2025
6.0.469 541 7/23/2025
6.0.468 544 7/23/2025
6.0.467 541 7/23/2025
6.0.466 545 7/23/2025
6.0.465 543 7/23/2025
6.0.464 542 7/23/2025
6.0.463 546 7/23/2025
6.0.462 537 7/22/2025
6.0.461 539 7/22/2025
6.0.460 433 7/21/2025
6.0.459 113 7/18/2025
6.0.458 127 7/18/2025
6.0.457 156 7/17/2025
6.0.456 157 7/17/2025
6.0.455 159 7/17/2025
6.0.454 159 7/17/2025
6.0.453 157 7/17/2025
6.0.451 156 7/17/2025
6.0.450 152 7/17/2025
6.0.449 162 7/17/2025
6.0.448 154 7/17/2025
6.0.447 154 7/16/2025
6.0.446 159 7/16/2025
6.0.445 153 7/16/2025
6.0.444 161 7/16/2025
6.0.443 160 7/16/2025
6.0.442 163 7/16/2025
6.0.438 158 7/15/2025
6.0.437 160 7/15/2025
6.0.436 150 7/15/2025
6.0.435 163 7/15/2025
6.0.433 153 7/14/2025
6.0.432 164 7/14/2025
6.0.431 132 7/11/2025
6.0.430 152 7/11/2025
6.0.429 166 7/10/2025
6.0.428 166 7/10/2025
6.0.427 158 7/9/2025
6.0.426 171 7/8/2025
6.0.425 159 7/8/2025
6.0.424 161 7/8/2025
6.0.423 168 7/8/2025
6.0.422 163 7/8/2025
6.0.421 169 7/8/2025
6.0.420 165 7/7/2025
6.0.419 164 7/7/2025
6.0.418 163 7/7/2025
6.0.417 165 7/7/2025
6.0.416 165 7/6/2025
6.0.415 119 7/4/2025
6.0.414 141 7/4/2025
6.0.411 172 7/3/2025
6.0.410 170 7/3/2025