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);
        }
Exemple #2
0
        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);
        }