public void Arrange() { _validator = new BulkUploadCreateApprentieshipEventsCommandValidator(); _apprenticeshipEvent = new ApprenticeshipEvent(); _command = new BulkUploadCreateApprenticeshipEventsCommand { ApprenticeshipEvents = new List <ApprenticeshipEvent>() }; _command.ApprenticeshipEvents.Add(_apprenticeshipEvent); }
private bool BulkCommandMatchesEvents(BulkUploadCreateApprenticeshipEventsCommand command, List <ApprenticeshipEvent> events) { if (command.ApprenticeshipEvents?.Count != events?.Count) { return(false); } var i = 0; foreach (var domainEvent in command.ApprenticeshipEvents) { if (!DomainEventMatchesApiEvent(domainEvent, events[i])) { return(false); } i++; } return(true); }