using Domain;
namespace TestData;
/// Test data builder for an (TestDataBuilder pattern); the only place tests touch an order's construction, so tests survive domain evolution.
public sealed class OrderBuilder
{
private readonly Order _order = new();
/// A valid, fresh order — the neutral starting point for tests.
public static OrderBuilder ValidOrder() => new();
public OrderBuilder WithId(Guid id)
{
_order.Id = id;
return this;
}
public OrderBuilder WithDescription(string description)
{
_order.Description = description;
return this;
}
/// Sets the total in cents (150_00 = €150.00).
public OrderBuilder WithTotal(int totalInCents)
{
_order.TotalInCents = totalInCents;
return this;
}
public Order Build() => _order;
}