public MaintenanceJobPlanned Build() { var customer = CustomerBuilder .Build(); var vehicle = VehicleBuilder .WithOwnerId(customer.Id) .Build(); var job = MaintenanceJobBuilder .WithCustomer(customer) .WithVehicle(vehicle) .Build(); MaintenanceJobPlanned e = new MaintenanceJobPlanned( Guid.NewGuid(), job.Id, job.StartTime, job.EndTime, (customer.Id, customer.Name, customer.TelephoneNumber), (vehicle.Id, vehicle.Brand, vehicle.Type), job.Description ); return(e); }
public PlanMaintenanceJob Build() { var customer = CustomerBuilder .Build(); var vehicle = VehicleBuilder .WithOwnerId(customer.Id) .Build(); var job = MaintenanceJobBuilder .WithCustomer(customer) .WithVehicle(vehicle) .Build(); PlanMaintenanceJob command = new PlanMaintenanceJob( Guid.NewGuid(), job.Id, job.PlannedTimeslot.StartTime, job.PlannedTimeslot.EndTime, (customer.Id, customer.Name, customer.TelephoneNumber), (vehicle.Id, vehicle.Brand, vehicle.Type), job.Description ); return(command); }
private void SetDefaults() { CustomerBuilder = new CustomerBuilder(); VehicleBuilder = new VehicleBuilder(); MaintenanceJobBuilder = new MaintenanceJobBuilder(); }
public MaintenanceJobPlannedEventBuilder WithEndTime(DateTime endTime) { MaintenanceJobBuilder.WithEndTime(endTime); return(this); }
public MaintenanceJobPlannedEventBuilder WithStartTime(DateTime startTime) { MaintenanceJobBuilder.WithStartTime(startTime); return(this); }
public MaintenanceJobPlannedEventBuilder WithJobId(Guid jobId) { MaintenanceJobBuilder.WithJobId(jobId); return(this); }
public PlanMaintenanceJobCommandBuilder WithMaintenanceJobBuilder(MaintenanceJobBuilder maintenanceJobBuilder) { MaintenanceJobBuilder = maintenanceJobBuilder; return(this); }