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 244 9/19/2025
8.0.564 246 9/19/2025
8.0.563 240 9/19/2025
8.0.562 252 9/19/2025
8.0.561 310 9/16/2025
8.0.560 298 9/16/2025
8.0.559 303 9/16/2025
8.0.558 309 9/16/2025
8.0.557 258 9/15/2025
8.0.556 254 9/15/2025
8.0.555 127 9/12/2025
8.0.554 172 9/11/2025
8.0.553 170 9/11/2025
8.0.552 180 9/11/2025
8.0.551 171 9/11/2025
8.0.550 157 9/11/2025
8.0.548 170 9/11/2025
8.0.547 167 9/11/2025
8.0.546 166 9/11/2025
8.0.545 161 9/11/2025
8.0.544 176 9/10/2025
8.0.543 178 9/10/2025
8.0.542 169 9/10/2025
8.0.541 174 9/10/2025
8.0.540 170 9/9/2025
8.0.539 168 9/9/2025
8.0.538 170 9/9/2025
8.0.537 167 9/9/2025
8.0.536 172 9/9/2025
8.0.535 166 9/9/2025
8.0.534 155 9/9/2025
8.0.533 172 9/9/2025
8.0.532 168 9/8/2025
8.0.531 153 9/5/2025
8.0.530 179 9/4/2025
8.0.529 178 9/4/2025
8.0.528 178 9/4/2025
8.0.527 183 9/4/2025
8.0.526 192 9/3/2025
8.0.525 163 9/2/2025
8.0.524 170 9/2/2025
8.0.523 158 9/2/2025
8.0.522 219 8/28/2025
8.0.521 223 8/27/2025
8.0.520 217 8/27/2025
8.0.519 213 8/27/2025
8.0.518 222 8/27/2025
8.0.517 190 8/25/2025
8.0.516 310 8/25/2025
8.0.515 235 8/24/2025
8.0.514 166 8/21/2025
8.0.513 171 8/20/2025
8.0.512 162 8/20/2025
8.0.511 164 8/20/2025
8.0.510 155 8/18/2025
8.0.509 163 8/18/2025
8.0.508 171 8/13/2025
8.0.505 173 8/13/2025
8.0.504 173 8/13/2025
8.0.503 171 8/13/2025
8.0.502 173 8/12/2025
8.0.501 172 8/12/2025
8.0.500 165 8/12/2025
8.0.499 175 8/12/2025
8.0.498 165 8/11/2025
8.0.497 204 8/8/2025
8.0.496 213 8/8/2025
8.0.495 209 8/8/2025
8.0.494 228 8/8/2025
8.0.493 243 8/7/2025
8.0.492 246 8/7/2025
8.0.491 245 8/7/2025
8.0.490 247 8/7/2025
8.0.489 255 8/5/2025
8.0.488 253 8/5/2025
8.0.487 103 8/1/2025
8.0.486 122 7/30/2025
8.0.485 161 7/28/2025
8.0.484 148 7/28/2025
8.0.483 152 7/28/2025
8.0.482 149 7/28/2025
8.0.481 137 7/28/2025
8.0.480 408 7/25/2025
8.0.479 437 7/25/2025
8.0.478 444 7/25/2025
8.0.477 448 7/25/2025
8.0.476 443 7/25/2025
8.0.475 501 7/24/2025
8.0.474 510 7/24/2025
8.0.473 546 7/23/2025
8.0.472 549 7/23/2025
8.0.470 554 7/23/2025
8.0.469 538 7/23/2025
8.0.468 550 7/23/2025
8.0.467 547 7/23/2025
8.0.466 556 7/23/2025
8.0.465 546 7/23/2025
8.0.464 546 7/23/2025
8.0.463 555 7/23/2025
8.0.462 548 7/22/2025
8.0.461 544 7/22/2025
8.0.460 444 7/21/2025
8.0.459 120 7/18/2025
8.0.458 131 7/18/2025
8.0.457 165 7/17/2025
8.0.456 166 7/17/2025
8.0.455 167 7/17/2025
8.0.454 165 7/17/2025
8.0.453 166 7/17/2025
8.0.451 159 7/17/2025
8.0.450 165 7/17/2025
8.0.449 164 7/17/2025
8.0.448 167 7/17/2025
8.0.447 160 7/16/2025
8.0.446 163 7/16/2025
8.0.445 167 7/16/2025
8.0.444 153 7/16/2025
8.0.443 170 7/16/2025
8.0.442 152 7/16/2025
8.0.438 164 7/15/2025
8.0.437 163 7/15/2025
8.0.436 168 7/15/2025
8.0.435 167 7/15/2025
8.0.433 161 7/14/2025
8.0.432 163 7/14/2025
8.0.431 152 7/11/2025
8.0.430 154 7/11/2025
8.0.429 176 7/10/2025
8.0.428 169 7/10/2025
8.0.427 172 7/9/2025
8.0.426 181 7/8/2025
8.0.425 164 7/8/2025
8.0.424 168 7/8/2025
8.0.423 170 7/8/2025
8.0.422 166 7/8/2025
8.0.421 168 7/8/2025
8.0.420 169 7/7/2025
8.0.419 172 7/7/2025
8.0.418 171 7/7/2025
8.0.417 166 7/7/2025
8.0.416 170 7/6/2025
8.0.415 132 7/4/2025
8.0.414 139 7/4/2025
8.0.411 173 7/3/2025
8.0.410 174 7/3/2025
6.0.565 231 9/19/2025
6.0.564 240 9/19/2025
6.0.563 248 9/19/2025
6.0.562 252 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 243 9/15/2025
6.0.556 249 9/15/2025
6.0.555 122 9/12/2025
6.0.554 168 9/11/2025
6.0.553 170 9/11/2025
6.0.552 165 9/11/2025
6.0.551 169 9/11/2025
6.0.550 165 9/11/2025
6.0.548 167 9/11/2025
6.0.547 169 9/11/2025
6.0.546 179 9/11/2025
6.0.545 170 9/11/2025
6.0.544 170 9/10/2025
6.0.543 174 9/10/2025
6.0.542 160 9/10/2025
6.0.541 175 9/10/2025
6.0.540 169 9/9/2025
6.0.539 169 9/9/2025
6.0.538 165 9/9/2025
6.0.537 169 9/9/2025
6.0.536 172 9/9/2025
6.0.535 163 9/9/2025
6.0.534 164 9/9/2025
6.0.533 158 9/9/2025
6.0.532 164 9/8/2025
6.0.531 143 9/5/2025
6.0.530 178 9/4/2025
6.0.529 179 9/4/2025
6.0.528 182 9/4/2025
6.0.527 180 9/4/2025
6.0.526 171 9/3/2025
6.0.525 165 9/2/2025
6.0.524 156 9/2/2025
6.0.523 164 9/2/2025
6.0.522 219 8/28/2025
6.0.521 208 8/27/2025
6.0.520 215 8/27/2025
6.0.519 219 8/27/2025
6.0.518 218 8/27/2025
6.0.517 188 8/25/2025
6.0.516 310 8/25/2025
6.0.515 231 8/24/2025
6.0.514 163 8/21/2025
6.0.513 166 8/20/2025
6.0.512 164 8/20/2025
6.0.511 165 8/20/2025
6.0.510 163 8/18/2025
6.0.509 152 8/18/2025
6.0.508 168 8/13/2025
6.0.505 172 8/13/2025
6.0.504 171 8/13/2025
6.0.503 169 8/13/2025
6.0.502 169 8/12/2025
6.0.501 168 8/12/2025
6.0.500 173 8/12/2025
6.0.499 170 8/12/2025
6.0.498 163 8/11/2025
6.0.497 203 8/8/2025
6.0.496 216 8/8/2025
6.0.495 212 8/8/2025
6.0.494 237 8/8/2025
6.0.493 241 8/7/2025
6.0.492 248 8/7/2025
6.0.491 240 8/7/2025
6.0.490 248 8/7/2025
6.0.489 255 8/5/2025
6.0.488 254 8/5/2025
6.0.487 97 8/1/2025
6.0.486 127 7/30/2025
6.0.485 150 7/28/2025
6.0.484 147 7/28/2025
6.0.483 145 7/28/2025
6.0.482 149 7/28/2025
6.0.481 148 7/28/2025
6.0.480 407 7/25/2025
6.0.479 430 7/25/2025
6.0.478 439 7/25/2025
6.0.477 423 7/25/2025
6.0.476 447 7/25/2025
6.0.475 496 7/24/2025
6.0.474 499 7/24/2025
6.0.473 548 7/23/2025
6.0.472 548 7/23/2025
6.0.470 544 7/23/2025
6.0.469 543 7/23/2025
6.0.468 547 7/23/2025
6.0.467 544 7/23/2025
6.0.466 547 7/23/2025
6.0.465 549 7/23/2025
6.0.464 545 7/23/2025
6.0.463 549 7/23/2025
6.0.462 541 7/22/2025
6.0.461 541 7/22/2025
6.0.460 435 7/21/2025
6.0.459 115 7/18/2025
6.0.458 129 7/18/2025
6.0.457 158 7/17/2025
6.0.456 161 7/17/2025
6.0.455 165 7/17/2025
6.0.454 164 7/17/2025
6.0.453 162 7/17/2025
6.0.451 160 7/17/2025
6.0.450 157 7/17/2025
6.0.449 164 7/17/2025
6.0.448 157 7/17/2025
6.0.447 156 7/16/2025
6.0.446 162 7/16/2025
6.0.445 155 7/16/2025
6.0.444 164 7/16/2025
6.0.443 164 7/16/2025
6.0.442 165 7/16/2025
6.0.438 160 7/15/2025
6.0.437 162 7/15/2025
6.0.436 153 7/15/2025
6.0.435 165 7/15/2025
6.0.433 155 7/14/2025
6.0.432 166 7/14/2025
6.0.431 136 7/11/2025
6.0.430 156 7/11/2025
6.0.429 169 7/10/2025
6.0.428 168 7/10/2025
6.0.427 162 7/9/2025
6.0.426 173 7/8/2025
6.0.425 165 7/8/2025
6.0.424 164 7/8/2025
6.0.423 170 7/8/2025
6.0.422 166 7/8/2025
6.0.421 171 7/8/2025
6.0.420 169 7/7/2025
6.0.419 166 7/7/2025
6.0.418 165 7/7/2025
6.0.417 167 7/7/2025
6.0.416 167 7/6/2025
6.0.415 123 7/4/2025
6.0.414 143 7/4/2025
6.0.411 174 7/3/2025
6.0.410 174 7/3/2025