Included file-scope statement for Ordering.UnitTest project
This commit is contained in:
		
							parent
							
								
									3d3322b5e6
								
							
						
					
					
						commit
						0ba2b33825
					
				| @ -1,18 +1,7 @@ | |||||||
| using System; | namespace UnitTest.Ordering.Application; | ||||||
| 
 | 
 | ||||||
| namespace UnitTest.Ordering.Application | public class IdentifiedCommandHandlerTest | ||||||
| { | { | ||||||
|     using global::Ordering.API.Application.Models; |  | ||||||
|     using MediatR; |  | ||||||
|     using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands; |  | ||||||
|     using Microsoft.eShopOnContainers.Services.Ordering.Infrastructure.Idempotency; |  | ||||||
|     using Microsoft.Extensions.Logging; |  | ||||||
|     using Moq; |  | ||||||
|     using System.Collections.Generic; |  | ||||||
|     using System.Threading.Tasks; |  | ||||||
|     using Xunit; |  | ||||||
|     public class IdentifiedCommandHandlerTest |  | ||||||
|     { |  | ||||||
|     private readonly Mock<IRequestManager> _requestManager; |     private readonly Mock<IRequestManager> _requestManager; | ||||||
|     private readonly Mock<IMediator> _mediator; |     private readonly Mock<IMediator> _mediator; | ||||||
|     private readonly Mock<ILogger<IdentifiedCommandHandler<CreateOrderCommand, bool>>> _loggerMock; |     private readonly Mock<ILogger<IdentifiedCommandHandler<CreateOrderCommand, bool>>> _loggerMock; | ||||||
| @ -87,5 +76,4 @@ namespace UnitTest.Ordering.Application | |||||||
|             cardHolderName: args != null && args.ContainsKey("cardHolderName") ? (string)args["cardHolderName"] : "XXX", |             cardHolderName: args != null && args.ContainsKey("cardHolderName") ? (string)args["cardHolderName"] : "XXX", | ||||||
|             cardTypeId: args != null && args.ContainsKey("cardTypeId") ? (int)args["cardTypeId"] : 0); |             cardTypeId: args != null && args.ContainsKey("cardTypeId") ? (int)args["cardTypeId"] : 0); | ||||||
|     } |     } | ||||||
|     } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,24 +1,11 @@ | |||||||
| using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands; | using Microsoft.eShopOnContainers.Services.Ordering.API.Application.IntegrationEvents; | ||||||
| using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Services; | 
 | ||||||
| using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; | namespace UnitTest.Ordering.Application; | ||||||
|  | 
 | ||||||
| using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | ||||||
| using Moq; |  | ||||||
| using System; |  | ||||||
| using System.Threading; |  | ||||||
| using System.Threading.Tasks; |  | ||||||
| 
 | 
 | ||||||
| 
 | public class NewOrderRequestHandlerTest | ||||||
| namespace UnitTest.Ordering.Application |  | ||||||
| { | { | ||||||
|     using global::Ordering.API.Application.IntegrationEvents; |  | ||||||
|     using global::Ordering.API.Application.Models; |  | ||||||
|     using MediatR; |  | ||||||
|     using Microsoft.Extensions.Logging; |  | ||||||
|     using System.Collections.Generic; |  | ||||||
|     using Xunit; |  | ||||||
| 
 |  | ||||||
|     public class NewOrderRequestHandlerTest |  | ||||||
|     { |  | ||||||
|     private readonly Mock<IOrderRepository> _orderRepositoryMock; |     private readonly Mock<IOrderRepository> _orderRepositoryMock; | ||||||
|     private readonly Mock<IIdentityService> _identityServiceMock; |     private readonly Mock<IIdentityService> _identityServiceMock; | ||||||
|     private readonly Mock<IMediator> _mediator; |     private readonly Mock<IMediator> _mediator; | ||||||
| @ -93,5 +80,4 @@ namespace UnitTest.Ordering.Application | |||||||
|             cardHolderName: args != null && args.ContainsKey("cardHolderName") ? (string)args["cardHolderName"] : "XXX", |             cardHolderName: args != null && args.ContainsKey("cardHolderName") ? (string)args["cardHolderName"] : "XXX", | ||||||
|             cardTypeId: args != null && args.ContainsKey("cardTypeId") ? (int)args["cardTypeId"] : 0); |             cardTypeId: args != null && args.ContainsKey("cardTypeId") ? (int)args["cardTypeId"] : 0); | ||||||
|     } |     } | ||||||
|     } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,22 +1,9 @@ | |||||||
| using MediatR; | namespace UnitTest.Ordering.Application; | ||||||
| using Microsoft.AspNetCore.Mvc; |  | ||||||
| using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands; |  | ||||||
| using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Queries; |  | ||||||
| using Microsoft.eShopOnContainers.Services.Ordering.API.Controllers; |  | ||||||
| using Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Services; |  | ||||||
| using Microsoft.Extensions.Logging; |  | ||||||
| using Moq; |  | ||||||
| using Ordering.API.Application.Commands; |  | ||||||
| using System; |  | ||||||
| using System.Linq; |  | ||||||
| using System.Threading; |  | ||||||
| using System.Threading.Tasks; |  | ||||||
| using Xunit; |  | ||||||
| 
 | 
 | ||||||
| namespace UnitTest.Ordering.Application | using Microsoft.eShopOnContainers.Services.Ordering.API.Application.Queries; | ||||||
|  | 
 | ||||||
|  | public class OrdersWebApiTest | ||||||
| { | { | ||||||
|     public class OrdersWebApiTest |  | ||||||
|     { |  | ||||||
|     private readonly Mock<IMediator> _mediatorMock; |     private readonly Mock<IMediator> _mediatorMock; | ||||||
|     private readonly Mock<IOrderQueries> _orderQueriesMock; |     private readonly Mock<IOrderQueries> _orderQueriesMock; | ||||||
|     private readonly Mock<IIdentityService> _identityServiceMock; |     private readonly Mock<IIdentityService> _identityServiceMock; | ||||||
| @ -144,5 +131,4 @@ namespace UnitTest.Ordering.Application | |||||||
|         //Assert |         //Assert | ||||||
|         Assert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK); |         Assert.Equal((actionResult.Result as OkObjectResult).StatusCode, (int)System.Net.HttpStatusCode.OK); | ||||||
|     } |     } | ||||||
|     } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,18 +1,17 @@ | |||||||
| using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | namespace UnitTest.Ordering; | ||||||
| using System; |  | ||||||
| 
 | 
 | ||||||
| namespace UnitTest.Ordering | using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | ||||||
|  | 
 | ||||||
|  | public class AddressBuilder | ||||||
| { | { | ||||||
|     public class AddressBuilder |  | ||||||
|     { |  | ||||||
|     public Address Build() |     public Address Build() | ||||||
|     { |     { | ||||||
|         return new Address("street", "city", "state", "country", "zipcode"); |         return new Address("street", "city", "state", "country", "zipcode"); | ||||||
|     } |     } | ||||||
|     } | } | ||||||
| 
 | 
 | ||||||
|     public class OrderBuilder | public class OrderBuilder | ||||||
|     { | { | ||||||
|     private readonly Order order; |     private readonly Order order; | ||||||
| 
 | 
 | ||||||
|     public OrderBuilder(Address address) |     public OrderBuilder(Address address) | ||||||
| @ -44,5 +43,4 @@ namespace UnitTest.Ordering | |||||||
|     { |     { | ||||||
|         return order; |         return order; | ||||||
|     } |     } | ||||||
|     } |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,9 +1,4 @@ | |||||||
| using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate; | public class BuyerAggregateTest | ||||||
| using Ordering.Domain.Exceptions; |  | ||||||
| using System; |  | ||||||
| using Xunit; |  | ||||||
| 
 |  | ||||||
| public class BuyerAggregateTest |  | ||||||
| { | { | ||||||
|     public BuyerAggregateTest() |     public BuyerAggregateTest() | ||||||
|     { } |     { } | ||||||
|  | |||||||
| @ -1,10 +1,6 @@ | |||||||
| using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | namespace Ordering.UnitTests.Domain; | ||||||
| using Ordering.Domain.Events; |  | ||||||
| using Ordering.Domain.Exceptions; |  | ||||||
| using System; |  | ||||||
| using UnitTest.Ordering; |  | ||||||
| using Xunit; |  | ||||||
| 
 | 
 | ||||||
|  | using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate; | ||||||
| public class OrderAggregateTest | public class OrderAggregateTest | ||||||
| { | { | ||||||
|     public OrderAggregateTest() |     public OrderAggregateTest() | ||||||
|  | |||||||
| @ -1,13 +1,7 @@ | |||||||
| using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork; | namespace Ordering.UnitTests.Domain.SeedWork; | ||||||
| using System; |  | ||||||
| using System.Collections.Generic; |  | ||||||
| using System.Linq; |  | ||||||
| using Xunit; |  | ||||||
| 
 | 
 | ||||||
| namespace Ordering.UnitTests.Domain.SeedWork | public class ValueObjectTests | ||||||
| { | { | ||||||
|     public class ValueObjectTests |  | ||||||
|     { |  | ||||||
|     public ValueObjectTests() |     public ValueObjectTests() | ||||||
|     { } |     { } | ||||||
| 
 | 
 | ||||||
| @ -185,5 +179,4 @@ namespace Ordering.UnitTests.Domain.SeedWork | |||||||
|             return HashCode.Combine(A, B); |             return HashCode.Combine(A, B); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     } |  | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user