Skip to content

Commit

Permalink
VIH-10899 remove obsolete hearing types and case roles
Browse files Browse the repository at this point in the history
  • Loading branch information
shaed-parkar committed Nov 25, 2024
1 parent 44c72e7 commit ba13a3f
Show file tree
Hide file tree
Showing 69 changed files with 672 additions and 1,788 deletions.
18 changes: 9 additions & 9 deletions AdminWebsite/AdminWebsite.IntegrationTests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,18 @@
},
"BookingsApi.Client": {
"type": "Transitive",
"resolved": "3.1.2-pr-0919-0010",
"contentHash": "uTjHes/RCMLANtbDLm2sfQTdqSA/90fwUGb2KthKSsZWpjoYdZtJYDjLtTNFqeH7qAKQTV0herli/gAyAAP0hg==",
"resolved": "3.1.2-pr-0919-0013",
"contentHash": "obv+kZ7pXc1ijmIiFzwEmFca1sNIIodlRHwzoiX5fUaIGNwX4Zgm4UZYEx2aM3kn0z1CMVXiYSerD6TGiNf4MA==",
"dependencies": {
"BookingsApi.Common.DotNet6": "3.1.2-pr-0919-0010",
"BookingsApi.Common.DotNet6": "3.1.2-pr-0919-0013",
"Microsoft.AspNetCore.Mvc.Core": "2.2.5",
"System.Text.Json": "8.0.5"
}
},
"BookingsApi.Common.DotNet6": {
"type": "Transitive",
"resolved": "3.1.2-pr-0919-0010",
"contentHash": "JBKWH0dvKUOBh9AnUV0C6ExjeV0Wem3bfmk7Gkxrqnc+Iz5cUvz6zyMMnGVX1mFlsEgrxVeJXj/DoTV0YCyN0Q==",
"resolved": "3.1.2-pr-0919-0013",
"contentHash": "BV8KrhMjIlCeRJajRCQ6X47VJSBAIql8O/1JSOgISVnnxTSNKiBc9htjyXgAsobkbAv6ylSTYVi6UENFp8BOiw==",
"dependencies": {
"System.Text.Json": "8.0.5"
}
Expand Down Expand Up @@ -943,8 +943,8 @@
},
"Microsoft.Identity.Client": {
"type": "Transitive",
"resolved": "4.61.0",
"contentHash": "3TDPEie+9t/NgBhoNifLFwM6nkypYUa8GUHfMnkYtovDDTQM8bsS2KEIP5tAh28BgfJZgof/KlCEKvGxz0H3Eg==",
"resolved": "4.61.3",
"contentHash": "naJo/Qm35Caaoxp5utcw+R8eU8ZtLz2ALh8S+gkekOYQ1oazfCQMWVT4NJ/FnHzdIJlm8dMz0oMpMGCabx5odA==",
"dependencies": {
"Microsoft.IdentityModel.Abstractions": "6.35.0",
"System.Diagnostics.DiagnosticSource": "6.0.1"
Expand Down Expand Up @@ -2161,7 +2161,7 @@
"type": "Project",
"dependencies": {
"AspNetCore.HealthChecks.Uris": "[8.0.1, )",
"BookingsApi.Client": "[3.1.2-pr-0919-0010, )",
"BookingsApi.Client": "[3.1.2-pr-0919-0013, )",
"FluentValidation.AspNetCore": "[11.3.0, )",
"LaunchDarkly.ServerSdk": "[8.5.0, )",
"MicroElements.Swashbuckle.FluentValidation": "[6.0.0, )",
Expand All @@ -2172,7 +2172,7 @@
"Microsoft.AspNetCore.SpaServices": "[3.1.32, )",
"Microsoft.AspNetCore.SpaServices.Extensions": "[8.0.4, )",
"Microsoft.Graph": "[5.52.0, )",
"Microsoft.Identity.Client": "[4.61.0, )",
"Microsoft.Identity.Client": "[4.61.3, )",
"Microsoft.OpenApi": "[1.6.14, )",
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets": "[1.20.1, )",
"NWebsec.AspNetCore.Middleware": "[3.0.0, )",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using AdminWebsite.Configuration;
using AdminWebsite.Models;
Expand All @@ -9,8 +8,6 @@
using BookingsApi.Contract.V2.Enums;
using BookingsApi.Contract.V2.Requests;
using BookingsApi.Contract.V2.Responses;
using FluentValidation;
using FluentValidation.Results;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
Expand All @@ -28,7 +25,6 @@ public class EditHearingTests

private AdminWebsite.Controllers.HearingsController _controller;
private EditHearingRequest _editEndpointOnHearingRequestWithJudge;
private Mock<IValidator<EditHearingRequest>> _editHearingRequestValidator;
private IHearingsService _hearingsService;

private Mock<ILogger<HearingsService>> _participantGroupLogger;
Expand All @@ -45,7 +41,6 @@ public void Setup()
{
_bookingsApiClient = new Mock<IBookingsApiClient>();
_userIdentity = new Mock<IUserIdentity>();
_editHearingRequestValidator = new Mock<IValidator<EditHearingRequest>>();
_conferencesServiceMock = new Mock<IConferenceDetailsService>();
_conferencesServiceMock.Setup(cs => cs.GetConferenceDetailsByHearingId(It.IsAny<Guid>(), false))
.ReturnsAsync(new ConferenceDetailsResponse
Expand All @@ -69,7 +64,6 @@ public void Setup()
_hearingsService = new HearingsService(_bookingsApiClient.Object, _participantGroupLogger.Object);
_controller = new AdminWebsite.Controllers.HearingsController(_bookingsApiClient.Object,
_userIdentity.Object,
_editHearingRequestValidator.Object,
new Mock<ILogger<AdminWebsite.Controllers.HearingsController>>().Object,
_hearingsService,
_conferencesServiceMock.Object);
Expand Down Expand Up @@ -161,9 +155,6 @@ public void Setup()
_bookingsApiClient.Setup(x => x.GetHearingDetailsByIdV2Async(It.IsAny<Guid>()))
.ReturnsAsync(_updatedExistingParticipantHearingOriginal);

_editHearingRequestValidator.Setup(x => x.ValidateAsync(It.IsAny<EditHearingRequest>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(new ValidationResult());

_v2HearingDetailsResponse = new HearingDetailsResponseV2
{
Id = _validId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public void Setup()
_hearingServiceMock = new Mock<IHearingsService>();
_controller = new AdminWebsite.Controllers.HearingsController(_bookingsApiClientMock.Object,
new Mock<IUserIdentity>().Object,
new Mock<IValidator<EditHearingRequest>>().Object,
new Mock<ILogger<AdminWebsite.Controllers.HearingsController>>().Object,
_hearingServiceMock.Object,
_conferenceDetailsServiceMock.Object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public abstract class HearingsControllerTests
{
private Mock<IConferenceDetailsService> _conferencesServiceMock;

private Mock<IValidator<EditHearingRequest>> _editHearingRequestValidator;
private IHearingsService _hearingsService;
private Mock<ILogger<HearingsService>> _participantGroupLogger;
private Mock<VodafoneConfiguration> _VodafoneConfigurationMock;
Expand All @@ -32,7 +31,6 @@ protected virtual void Setup()
{
BookingsApiClient = new Mock<IBookingsApiClient>();
UserIdentity = new Mock<IUserIdentity>();
_editHearingRequestValidator = new Mock<IValidator<EditHearingRequest>>();
_conferencesServiceMock = new Mock<IConferenceDetailsService>();
FeatureToggle = new Mock<IFeatureToggles>();
_conferencesServiceMock.Setup(cs => cs.GetConferenceDetailsByHearingId(It.IsAny<Guid>(), false))
Expand All @@ -58,7 +56,6 @@ protected virtual void Setup()

Controller = new AdminWebsite.Controllers.HearingsController(BookingsApiClient.Object,
UserIdentity.Object,
_editHearingRequestValidator.Object,
new Mock<ILogger<AdminWebsite.Controllers.HearingsController>>().Object,
_hearingsService,
_conferencesServiceMock.Object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public void Setup()
public async Task Should_get_unallocated_hearings()
{
// Arrange
_mocker.Mock<IBookingsApiClient>().Setup(client => client.GetUnallocatedHearingsAsync())
_mocker.Mock<IBookingsApiClient>().Setup(client => client.GetUnallocatedHearingsV2Async())
.ReturnsAsync(new List<HearingDetailsResponseV2> {new ()});
// Act
var response = await _controller.GetUnallocatedHearings();
Expand All @@ -40,7 +40,7 @@ public async Task Should_get_unallocated_hearings()
public async Task Should_try_get_unallocated_hearings_and_return_empty_list()
{
// Arrange
_mocker.Mock<IBookingsApiClient>().Setup(client => client.GetUnallocatedHearingsAsync())
_mocker.Mock<IBookingsApiClient>().Setup(client => client.GetUnallocatedHearingsV2Async())
.ReturnsAsync(new List<HearingDetailsResponseV2>());

// Act
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ public void should_map_v2_model_to_hearing_detail_response()
actual.Id.Should().Be(hearing.Id);
actual.ScheduledDateTime.Should().Be(hearing.ScheduledDateTime);
actual.ScheduledDuration.Should().Be(hearing.ScheduledDuration);
actual.HearingVenueName.Should().Be(hearing.HearingVenueName);
actual.HearingVenueCode.Should().Be(hearing.HearingVenueCode);
actual.ServiceId.Should().Be(hearing.ServiceId);
actual.CaseTypeName.Should().Be(hearing.ServiceName);
actual.ConferenceSupplier.Should().Be(AdminWebsite.Contracts.Enums.VideoSupplier.Vodafone);
actual.AllocatedToUsername.Should().Be(hearing.AllocatedToUsername);
}
Expand Down
18 changes: 9 additions & 9 deletions AdminWebsite/AdminWebsite.UnitTests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,18 @@
},
"BookingsApi.Client": {
"type": "Transitive",
"resolved": "3.1.2-pr-0919-0010",
"contentHash": "uTjHes/RCMLANtbDLm2sfQTdqSA/90fwUGb2KthKSsZWpjoYdZtJYDjLtTNFqeH7qAKQTV0herli/gAyAAP0hg==",
"resolved": "3.1.2-pr-0919-0013",
"contentHash": "obv+kZ7pXc1ijmIiFzwEmFca1sNIIodlRHwzoiX5fUaIGNwX4Zgm4UZYEx2aM3kn0z1CMVXiYSerD6TGiNf4MA==",
"dependencies": {
"BookingsApi.Common.DotNet6": "3.1.2-pr-0919-0010",
"BookingsApi.Common.DotNet6": "3.1.2-pr-0919-0013",
"Microsoft.AspNetCore.Mvc.Core": "2.2.5",
"System.Text.Json": "8.0.5"
}
},
"BookingsApi.Common.DotNet6": {
"type": "Transitive",
"resolved": "3.1.2-pr-0919-0010",
"contentHash": "JBKWH0dvKUOBh9AnUV0C6ExjeV0Wem3bfmk7Gkxrqnc+Iz5cUvz6zyMMnGVX1mFlsEgrxVeJXj/DoTV0YCyN0Q==",
"resolved": "3.1.2-pr-0919-0013",
"contentHash": "BV8KrhMjIlCeRJajRCQ6X47VJSBAIql8O/1JSOgISVnnxTSNKiBc9htjyXgAsobkbAv6ylSTYVi6UENFp8BOiw==",
"dependencies": {
"System.Text.Json": "8.0.5"
}
Expand Down Expand Up @@ -861,8 +861,8 @@
},
"Microsoft.Identity.Client": {
"type": "Transitive",
"resolved": "4.61.0",
"contentHash": "3TDPEie+9t/NgBhoNifLFwM6nkypYUa8GUHfMnkYtovDDTQM8bsS2KEIP5tAh28BgfJZgof/KlCEKvGxz0H3Eg==",
"resolved": "4.61.3",
"contentHash": "naJo/Qm35Caaoxp5utcw+R8eU8ZtLz2ALh8S+gkekOYQ1oazfCQMWVT4NJ/FnHzdIJlm8dMz0oMpMGCabx5odA==",
"dependencies": {
"Microsoft.IdentityModel.Abstractions": "6.35.0",
"System.Diagnostics.DiagnosticSource": "6.0.1"
Expand Down Expand Up @@ -2231,7 +2231,7 @@
"type": "Project",
"dependencies": {
"AspNetCore.HealthChecks.Uris": "[8.0.1, )",
"BookingsApi.Client": "[3.1.2-pr-0919-0010, )",
"BookingsApi.Client": "[3.1.2-pr-0919-0013, )",
"FluentValidation.AspNetCore": "[11.3.0, )",
"LaunchDarkly.ServerSdk": "[8.5.0, )",
"MicroElements.Swashbuckle.FluentValidation": "[6.0.0, )",
Expand All @@ -2242,7 +2242,7 @@
"Microsoft.AspNetCore.SpaServices": "[3.1.32, )",
"Microsoft.AspNetCore.SpaServices.Extensions": "[8.0.4, )",
"Microsoft.Graph": "[5.52.0, )",
"Microsoft.Identity.Client": "[4.61.0, )",
"Microsoft.Identity.Client": "[4.61.3, )",
"Microsoft.OpenApi": "[1.6.14, )",
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets": "[1.20.1, )",
"NWebsec.AspNetCore.Middleware": "[3.0.0, )",
Expand Down
4 changes: 2 additions & 2 deletions AdminWebsite/AdminWebsite/AdminWebsite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="8.0.1" />
<PackageReference Include="BookingsApi.Client" Version="3.1.2-pr-0919-0010" />
<PackageReference Include="BookingsApi.Client" Version="3.1.2-pr-0919-0013" />
<PackageReference Include="LaunchDarkly.ServerSdk" Version="8.5.0" />
<PackageReference Include="MicroElements.Swashbuckle.FluentValidation" Version="6.0.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.61.3" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
<PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.22.0" />
Expand Down
Loading

0 comments on commit ba13a3f

Please sign in to comment.