Skip to content

Commit

Permalink
including ignorereservations when creating order in service (#495)
Browse files Browse the repository at this point in the history
* including ignorereservations when creating order in service

* force ignoreReservations value in constructor

* fixed test input
  • Loading branch information
acn-sbuad authored Apr 22, 2024
1 parent 2ef0376 commit 0b96880
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class NotificationOrder : IBaseNotificationOrder
public NotificationChannel NotificationChannel { get; internal set; }

/// <inheritdoc/>>
public bool IgnoreReservation { get; set; }
public bool IgnoreReservation { get; internal set; }

/// <inheritdoc/>>
public Creator Creator { get; internal set; }
Expand Down Expand Up @@ -53,7 +53,7 @@ public NotificationOrder(
Creator creator,
DateTime created,
List<Recipient> recipients,
bool ignoreReservation = false)
bool ignoreReservation)
{
Id = id;
SendersReference = sendersReference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public async Task<NotificationOrderRequestResponse> RegisterNotificationOrder(No
orderRequest.NotificationChannel,
orderRequest.Creator,
created,
orderRequest.Recipients);
orderRequest.Recipients,
orderRequest.IgnoreReservation);

NotificationOrder savedOrder = await _repository.Create(order);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void AddAltinnClients(this IServiceCollection services, IConfigura
{
_ = config.GetSection(nameof(PlatformSettings))
.Get<PlatformSettings>()
?? throw new ArgumentNullException(nameof(config), "Required AltinnServiceSettings is missing from application configuration");
?? throw new ArgumentNullException(nameof(config), "Required PlatformSettings is missing from application configuration");

services
.Configure<PlatformSettings>(config.GetSection(nameof(PlatformSettings)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public OrdersControllerTests(IntegrationTestWebApplicationFactory<Controllers.Or
NotificationChannel.Email,
new Creator("ttd"),
DateTime.UtcNow,
new List<Recipient>());
new List<Recipient>(),
false);

_orderWithStatus = new(
Guid.NewGuid(),
Expand Down

0 comments on commit 0b96880

Please sign in to comment.