diff --git a/.gitignore b/.gitignore index a330fd611..8fe7269df 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,9 @@ bld/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ +# Visual Studio Code +.vscode/ + # Visual Studio 2017 auto generated files Generated\ Files/ diff --git a/BookingsApi/BookingsApi.Client/BookingsApiClient.cs b/BookingsApi/BookingsApi.Client/BookingsApiClient.cs index f0ab01655..709052f1d 100644 --- a/BookingsApi/BookingsApi.Client/BookingsApiClient.cs +++ b/BookingsApi/BookingsApi.Client/BookingsApiClient.cs @@ -1127,6 +1127,7 @@ public partial interface IBookingsApiClient /// Hearing Reference ID array /// list of hearing Ids with the allocated cso /// A server side error occurred. + [System.Obsolete] System.Threading.Tasks.Task> GetAllocationsForHearingsAsync(System.Collections.Generic.IEnumerable hearingIds); /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. @@ -1136,6 +1137,7 @@ public partial interface IBookingsApiClient /// Hearing Reference ID array /// list of hearing Ids with the allocated cso /// A server side error occurred. + [System.Obsolete] System.Threading.Tasks.Task> GetAllocationsForHearingsAsync(System.Collections.Generic.IEnumerable hearingIds, System.Threading.CancellationToken cancellationToken); /// @@ -9491,6 +9493,7 @@ public virtual async System.Threading.Tasks.Task AllocateHe /// Hearing Reference ID array /// list of hearing Ids with the allocated cso /// A server side error occurred. + [System.Obsolete] public virtual System.Threading.Tasks.Task> GetAllocationsForHearingsAsync(System.Collections.Generic.IEnumerable hearingIds) { return GetAllocationsForHearingsAsync(hearingIds, System.Threading.CancellationToken.None); @@ -9503,6 +9506,7 @@ public virtual async System.Threading.Tasks.Task AllocateHe /// Hearing Reference ID array /// list of hearing Ids with the allocated cso /// A server side error occurred. + [System.Obsolete] public virtual async System.Threading.Tasks.Task> GetAllocationsForHearingsAsync(System.Collections.Generic.IEnumerable hearingIds, System.Threading.CancellationToken cancellationToken) { if (hearingIds == null) diff --git a/BookingsApi/BookingsApi.DAL/Queries/GetHearingsForTodayQueryHandler.cs b/BookingsApi/BookingsApi.DAL/Queries/GetHearingsForTodayQueryHandler.cs index ded42d410..5be09450e 100644 --- a/BookingsApi/BookingsApi.DAL/Queries/GetHearingsForTodayQueryHandler.cs +++ b/BookingsApi/BookingsApi.DAL/Queries/GetHearingsForTodayQueryHandler.cs @@ -27,6 +27,7 @@ public async Task> Handle(GetHearingsForTodayQuery query) .Include(x => x.Participants).ThenInclude(x => x.CaseRole) .Include(x => x.Participants).ThenInclude(x => x.HearingRole).ThenInclude(x => x.UserRole) .Include(x => x.HearingCases).ThenInclude(x => x.Case) + .Include(x => x.Endpoints) .Include(x => x.CaseType) .Include(x => x.HearingVenue) .Where(x => x.ScheduledDateTime.Date == DateTime.Today.Date) diff --git a/BookingsApi/BookingsApi.IntegrationTests/Database/Queries/GetHearingsForTodayQueryHandlerDatabaseTests.cs b/BookingsApi/BookingsApi.IntegrationTests/Database/Queries/GetHearingsForTodayQueryHandlerDatabaseTests.cs index c34926b5e..fd2e61d11 100644 --- a/BookingsApi/BookingsApi.IntegrationTests/Database/Queries/GetHearingsForTodayQueryHandlerDatabaseTests.cs +++ b/BookingsApi/BookingsApi.IntegrationTests/Database/Queries/GetHearingsForTodayQueryHandlerDatabaseTests.cs @@ -49,5 +49,19 @@ public async Task Should_return_list_of_hearing_for_today_by_venue_but_dont_incl venues.Should().Contain(x=> x.Id == _seededHearing.Id); venues.Should().NotContain(x=> x.Id == hearing2.Id); } + + [Test] + public async Task Should_return_list_of_hearing_for_today_including_endpoints() + { + _seededHearing = await Hooks.SeedVideoHearing(options => + { + options.ScheduledDate = DateTime.UtcNow.Date; + options.EndpointsToAdd = 2; + }); + var query = new GetHearingsForTodayQuery(); + var venues = await _handler.Handle(query); + venues.Should().Contain(h => h.Id == _seededHearing.Id); + venues.Should().Contain(v=>v.Endpoints.Any()); + } } } \ No newline at end of file