Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit d87c089

Browse files
committed
Simplify names where applicable
1 parent 1ee9625 commit d87c089

File tree

15 files changed

+17
-24
lines changed

15 files changed

+17
-24
lines changed

src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToAwaitingValidationIntegrationEventHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public OrderStatusChangedToAwaitingValidationIntegrationEventHandler(
1414
{
1515
_catalogContext = catalogContext;
1616
_catalogIntegrationEventService = catalogIntegrationEventService;
17-
_logger = logger ?? throw new System.ArgumentNullException(nameof(logger));
17+
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
1818
}
1919

2020
public async Task Handle(OrderStatusChangedToAwaitingValidationIntegrationEvent @event)

src/Services/Catalog/Catalog.API/IntegrationEvents/EventHandling/OrderStatusChangedToPaidIntegrationEventHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public OrderStatusChangedToPaidIntegrationEventHandler(
1111
ILogger<OrderStatusChangedToPaidIntegrationEventHandler> logger)
1212
{
1313
_catalogContext = catalogContext;
14-
_logger = logger ?? throw new System.ArgumentNullException(nameof(logger));
14+
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
1515
}
1616

1717
public async Task Handle(OrderStatusChangedToPaidIntegrationEvent @event)

src/Services/Identity/Identity.API/SeedData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ await retryPolicy.ExecuteAsync(async () =>
9292
});
9393
}
9494

95-
private static AsyncPolicy CreateRetryPolicy(IConfiguration configuration, Microsoft.Extensions.Logging.ILogger logger)
95+
private static AsyncPolicy CreateRetryPolicy(IConfiguration configuration, ILogger logger)
9696
{
9797
var retryMigrations = false;
9898
bool.TryParse(configuration["RetryMigrations"], out retryMigrations);

src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/GracePeriodConfirmedIntegrationEventHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public GracePeriodConfirmedIntegrationEventHandler(
1010
ILogger<GracePeriodConfirmedIntegrationEventHandler> logger)
1111
{
1212
_mediator = mediator;
13-
_logger = logger ?? throw new System.ArgumentNullException(nameof(logger));
13+
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
1414
}
1515

1616
/// <summary>

src/Services/Ordering/Ordering.API/Application/IntegrationEvents/EventHandling/OrderStockRejectedIntegrationEventHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public OrderStockRejectedIntegrationEventHandler(
99
ILogger<OrderStockRejectedIntegrationEventHandler> logger)
1010
{
1111
_mediator = mediator;
12-
_logger = logger ?? throw new System.ArgumentNullException(nameof(logger));
12+
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
1313
}
1414

1515
public async Task Handle(OrderStockRejectedIntegrationEvent @event)

src/Services/Ordering/Ordering.Domain/GlobalUsings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
global using System.Reflection;
2-
global using global::Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions;
2+
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.Exceptions;
33
global using MediatR;
44
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate;
55
global using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate;

src/Services/Ordering/Ordering.FunctionalTests/GlobalUsings.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
global using System;
2-
global using System.IO;
1+
global using System.IO;
32
global using System.Net.Http;
43
global using System.Security.Claims;
5-
global using System.Threading.Tasks;
64
global using Microsoft.AspNetCore.Builder;
75
global using Microsoft.AspNetCore.Hosting;
86
global using Microsoft.AspNetCore.Http;

src/Services/Ordering/Ordering.UnitTests/Application/NewOrderCommandHandlerTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public async Task Handle_return_false_if_order_is_not_persisted()
2929
{ ["cardExpiration"] = DateTime.Now.AddYears(1) });
3030

3131
_orderRepositoryMock.Setup(orderRepo => orderRepo.GetAsync(It.IsAny<int>()))
32-
.Returns(Task.FromResult<Order>(FakeOrder()));
32+
.Returns(Task.FromResult(FakeOrder()));
3333

3434
_orderRepositoryMock.Setup(buyerRepo => buyerRepo.UnitOfWork.SaveChangesAsync(default))
3535
.Returns(Task.FromResult(1));
@@ -39,7 +39,7 @@ public async Task Handle_return_false_if_order_is_not_persisted()
3939
var LoggerMock = new Mock<ILogger<CreateOrderCommandHandler>>();
4040
//Act
4141
var handler = new CreateOrderCommandHandler(_mediator.Object, _orderingIntegrationEventService.Object, _orderRepositoryMock.Object, _identityServiceMock.Object, LoggerMock.Object);
42-
var cltToken = new System.Threading.CancellationToken();
42+
var cltToken = new CancellationToken();
4343
var result = await handler.Handle(fakeOrderCmd, cltToken);
4444

4545
//Assert

src/Services/Ordering/Ordering.UnitTests/GlobalUsings.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
global using System;
2-
global using System.Collections.Generic;
3-
global using System.Linq;
4-
global using System.Threading;
5-
global using System.Threading.Tasks;
6-
global using MediatR;
1+
global using MediatR;
72
global using Microsoft.AspNetCore.Mvc;
83
global using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands;
94
global using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Models;

src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public OrderStatusChangedToStockConfirmedIntegrationEventHandler(
1414
{
1515
_eventBus = eventBus;
1616
_settings = settings.Value;
17-
_logger = logger ?? throw new System.ArgumentNullException(nameof(logger));
17+
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
1818

1919
_logger.LogTrace("PaymentSettings: {@PaymentSettings}", _settings);
2020
}

0 commit comments

Comments
 (0)