From 14312b8679d0b28f2f5dff13de3d831454d8e88d Mon Sep 17 00:00:00 2001 From: Robert Good Date: Wed, 14 Jun 2023 20:44:25 -0700 Subject: [PATCH 01/26] Added 409 to put --- .../Exceptions/ConflictException.cs | 23 ++++++++++++++++++ .../Business/Commands/AddBusinessCommand.cs | 19 ++++++++------- .../Common/Exceptions/ConflictException.cs | 23 ++++++++++++++++++ .../Application/Interfaces/IBusinessRepo.cs | 2 +- .../Persistence/Repositories/BusinessRepo.cs | 19 ++++++++++++--- .../Controllers/BusinessController.cs | 7 +++--- .../Api.WebApi/Goodtocode.Subjects.WebApi.xml | 2 +- .../Web.BlazorServer/Data/BusinessService.cs | 22 +++++++++++++++++ .../Pages/Business/BusinessCreate.razor | 24 +++++++++++++++++++ .../Pages/Business/BusinessList.razor | 8 ++----- .../Web.BlazorServer/Web.BlazorServer.csproj | 6 +++++ 11 files changed, 133 insertions(+), 22 deletions(-) create mode 100644 src/Subjects/Common/Common.Application/Exceptions/ConflictException.cs create mode 100644 src/Subjects/Core/Application/Common/Exceptions/ConflictException.cs create mode 100644 src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessCreate.razor diff --git a/src/Subjects/Common/Common.Application/Exceptions/ConflictException.cs b/src/Subjects/Common/Common.Application/Exceptions/ConflictException.cs new file mode 100644 index 00000000..181829a8 --- /dev/null +++ b/src/Subjects/Common/Common.Application/Exceptions/ConflictException.cs @@ -0,0 +1,23 @@ +namespace Goodtocode.Common.Application.Exceptions; + +public class ConflictException : Exception +{ + public ConflictException() + { + } + + public ConflictException(string message) + : base(message) + { + } + + public ConflictException(string message, Exception innerException) + : base(message, innerException) + { + } + + public ConflictException(string name, string duplicateReason) + : base($"Entity \"{name}\" is a duplicated by {duplicateReason}.") + { + } +} \ No newline at end of file diff --git a/src/Subjects/Core/Application/Business/Commands/AddBusinessCommand.cs b/src/Subjects/Core/Application/Business/Commands/AddBusinessCommand.cs index c842c6a2..7d04e514 100644 --- a/src/Subjects/Core/Application/Business/Commands/AddBusinessCommand.cs +++ b/src/Subjects/Core/Application/Business/Commands/AddBusinessCommand.cs @@ -1,16 +1,17 @@ -using Goodtocode.Subjects.Domain; +using CSharpFunctionalExtensions; +using Goodtocode.Subjects.Application.Common.Exceptions; +using Goodtocode.Subjects.Domain; using MediatR; namespace Goodtocode.Subjects.Application; -public class AddBusinessCommand : IRequest, IBusinessEntity +public class AddBusinessCommand : IRequest, IBusinessObject { - public Guid BusinessKey { get; set; } public string BusinessName { get; set; } = string.Empty; public string TaxNumber { get; set; } = string.Empty; } -public class AddBusinessCommandHandler : IRequestHandler +public class AddBusinessCommandHandler : IRequestHandler { private readonly IBusinessRepo _userBusinessRepo; @@ -19,12 +20,14 @@ public AddBusinessCommandHandler(IBusinessRepo BusinessRepo) _userBusinessRepo = BusinessRepo; } - public async Task Handle(AddBusinessCommand request, CancellationToken cancellationToken) + public async Task Handle(AddBusinessCommand request, CancellationToken cancellationToken) { - var AddResult = + var business = await _userBusinessRepo.AddBusinessAsync(request, cancellationToken); - if (AddResult.IsFailure) - throw new Exception(AddResult.Error); + return business.Match( + value => business.Value, + failure => throw new ConflictException(business.Error) + ); } } \ No newline at end of file diff --git a/src/Subjects/Core/Application/Common/Exceptions/ConflictException.cs b/src/Subjects/Core/Application/Common/Exceptions/ConflictException.cs new file mode 100644 index 00000000..57288d8e --- /dev/null +++ b/src/Subjects/Core/Application/Common/Exceptions/ConflictException.cs @@ -0,0 +1,23 @@ +namespace Goodtocode.Subjects.Application.Common.Exceptions; + +public class ConflictException : Exception +{ + public ConflictException() + { + } + + public ConflictException(string message) + : base(message) + { + } + + public ConflictException(string message, Exception innerException) + : base(message, innerException) + { + } + + public ConflictException(string name, string duplicateReason) + : base($"Entity \"{name}\" is a duplicated by {duplicateReason}.") + { + } +} \ No newline at end of file diff --git a/src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs b/src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs index a77de162..787b7a33 100644 --- a/src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs +++ b/src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs @@ -11,7 +11,7 @@ public interface IBusinessRepo Task>> GetBusinessesByNameAsync(string businessName, CancellationToken cancellationToken); - Task AddBusinessAsync(IBusinessObject businessInfo, + Task> AddBusinessAsync(IBusinessObject businessInfo, CancellationToken cancellationToken); Task UpdateBusinessAsync(IBusinessEntity businessInfo, diff --git a/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs b/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs index a09bba9d..4db8b7a9 100644 --- a/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs +++ b/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs @@ -1,6 +1,7 @@ using CSharpFunctionalExtensions; using Goodtocode.Subjects.Application; using Goodtocode.Subjects.Domain; +using Microsoft.Data.SqlClient; using Microsoft.EntityFrameworkCore; using System.Data; @@ -30,12 +31,24 @@ public async Task>> GetBusinessesByNameAsync(string return Result.Success(businessResult); } - public async Task AddBusinessAsync(IBusinessObject businessInfo, CancellationToken cancellationToken) + public async Task> AddBusinessAsync(IBusinessObject businessInfo, CancellationToken cancellationToken) { if (businessInfo == null) - return Result.Failure("Cannot add. Business is null."); + return Result.Failure("Cannot add. Business is null."); var businessResult = await _context.Business.AddAsync((BusinessEntity)businessInfo, cancellationToken); - return Result.Success(businessResult); + + try + { + await _context.SaveChangesAsync(cancellationToken); + } + catch (DbUpdateException e) + when (e.InnerException?.InnerException is SqlException sqlEx && + (sqlEx.Number == 2601 || sqlEx.Number == 2627)) + { + return Result.Failure("Cannot add. Duplicate record exists."); + } + + return Result.Success(businessResult.Entity); } public async Task UpdateBusinessAsync(IBusinessEntity businessInfo, CancellationToken cancellationToken) diff --git a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs b/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs index 5818a359..da1b83b6 100644 --- a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs +++ b/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs @@ -63,15 +63,16 @@ public async Task Get(Guid key) /// "TaxNumber": "12-445666" /// } /// - /// bool + /// Created Item URI and Object [HttpPut(Name = "AddBusinessCommand")] [ProducesResponseType(StatusCodes.Status201Created)] [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status409Conflict)] public async Task Put([FromBody] AddBusinessCommand command) { - await Mediator.Send(command); + var createdEntity = await Mediator.Send(command); - return Ok(); + return Created(new Uri($"{Request.Path}/{createdEntity.Key}", UriKind.Relative), createdEntity); } /// diff --git a/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml b/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml index a7384d24..e970f95b 100644 --- a/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml +++ b/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml @@ -83,7 +83,7 @@ "TaxNumber": "12-445666" } - bool + Created Item URI and Object diff --git a/src/Subjects/Presentation/Web.BlazorServer/Data/BusinessService.cs b/src/Subjects/Presentation/Web.BlazorServer/Data/BusinessService.cs index 6c0e4ace..a86b12ff 100644 --- a/src/Subjects/Presentation/Web.BlazorServer/Data/BusinessService.cs +++ b/src/Subjects/Presentation/Web.BlazorServer/Data/BusinessService.cs @@ -1,3 +1,4 @@ +using Goodtocode.Subjects.BlazorServer.Pages.Business; using Goodtocode.Subjects.Domain; using System.Net; using System.Text.Json; @@ -22,6 +23,8 @@ public async Task GetBusinessAsync(Guid key) { response.EnsureSuccessStatusCode(); business = JsonSerializer.Deserialize(response.Content.ReadAsStream()); + if (business == null) + throw new Exception(); } return business; } @@ -35,7 +38,26 @@ public async Task> GetBusinessesAsync(string name) { response.EnsureSuccessStatusCode(); business = JsonSerializer.Deserialize>(response.Content.ReadAsStream()); + if (business == null) + throw new Exception(); } return business; } + + public async Task CreateBusinessAsync(BusinessObject business) + { + BusinessEntity? businessCreated = null; + var httpClient = _clientFactory.CreateClient("SubjectsApiClient"); + var response = await httpClient.PutAsJsonAsync($"{httpClient.BaseAddress}/Business?api-version=1", business); + + if (response.StatusCode == HttpStatusCode.Created) + businessCreated = JsonSerializer.Deserialize(await response.Content.ReadAsStreamAsync()); + + if (businessCreated == null) + throw new Exception(); + + response.EnsureSuccessStatusCode(); + + return businessCreated; + } } \ No newline at end of file diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessCreate.razor b/src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessCreate.razor new file mode 100644 index 00000000..856e1f36 --- /dev/null +++ b/src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessCreate.razor @@ -0,0 +1,24 @@ +@page "/businesscreate" +@using Goodtocode.Subjects.BlazorServer.Data; +@using Goodtocode.Subjects.Domain; + +@inject BusinessService Service + +Create a Business + +

Business Create

+ +

Create a businesses

+ + + + +@code { + private string businessName = string.Empty; + private BusinessObject business = new BusinessObject(); + + private async Task CreateBusineses() + { + await Service.CreateBusinessAsync(business); + } +} diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessList.razor b/src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessList.razor index e0116c62..ddf0e523 100644 --- a/src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessList.razor +++ b/src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessList.razor @@ -44,12 +44,8 @@ else } @code { - private string businessName; - private IEnumerable businesses; - - protected override async Task OnInitializedAsync() - { - } + private string businessName = string.Empty; + private IEnumerable businesses = new List(); private async Task GetBusineses() { diff --git a/src/Subjects/Presentation/Web.BlazorServer/Web.BlazorServer.csproj b/src/Subjects/Presentation/Web.BlazorServer/Web.BlazorServer.csproj index 36fda27b..dedb6c05 100644 --- a/src/Subjects/Presentation/Web.BlazorServer/Web.BlazorServer.csproj +++ b/src/Subjects/Presentation/Web.BlazorServer/Web.BlazorServer.csproj @@ -27,4 +27,10 @@ + + + true + + + From 9d483503a0ec53fc28e29edfb788889ac00b9a07 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Wed, 14 Jun 2023 20:47:05 -0700 Subject: [PATCH 02/26] Api fliter to handle 409 --- .../Common/ApiExceptionFilterAttribute.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Subjects/Presentation/Api.WebApi/Common/ApiExceptionFilterAttribute.cs b/src/Subjects/Presentation/Api.WebApi/Common/ApiExceptionFilterAttribute.cs index c3a5f016..6e9ba3d8 100644 --- a/src/Subjects/Presentation/Api.WebApi/Common/ApiExceptionFilterAttribute.cs +++ b/src/Subjects/Presentation/Api.WebApi/Common/ApiExceptionFilterAttribute.cs @@ -22,6 +22,7 @@ public ApiExceptionFilterAttribute() _exceptionHandlers = new Dictionary> { {typeof(ValidationException), HandleValidationException}, + {typeof(ConflictException), HandleConflictException}, {typeof(NotFoundException), HandleNotFoundException}, {typeof(UnauthorizedAccessException), HandleUnauthorizedAccessException}, {typeof(ForbiddenAccessException), HandleForbiddenAccessException} @@ -83,6 +84,22 @@ private void HandleInvalidModelStateException(ExceptionContext context) context.ExceptionHandled = true; } + private void HandleConflictException(ExceptionContext context) + { + var exception = context.Exception as ConflictException ?? new ConflictException(); + + var details = new ProblemDetails + { + Type = "https://tools.ietf.org/html/rfc7231#section-6.5.8", + Title = "The specified resource has a conflict.", + Detail = exception.Message + }; + + context.Result = new ConflictObjectResult(details); + + context.ExceptionHandled = true; + } + private void HandleNotFoundException(ExceptionContext context) { var exception = context.Exception as NotFoundException ?? new NotFoundException(); From 388fa4e26c97f63f509d77cff8ee1d5ecf150a40 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Thu, 15 Jun 2023 20:16:26 -0700 Subject: [PATCH 03/26] Put/Add works --- .../Entities.Subjects/Entities.Subjects.sqlproj | 16 ++++++++++++++++ .../Persistence/Repositories/BusinessRepo.cs | 9 ++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 data/Subjects/Entities.Subjects/Entities.Subjects.sqlproj diff --git a/data/Subjects/Entities.Subjects/Entities.Subjects.sqlproj b/data/Subjects/Entities.Subjects/Entities.Subjects.sqlproj new file mode 100644 index 00000000..810b6550 --- /dev/null +++ b/data/Subjects/Entities.Subjects/Entities.Subjects.sqlproj @@ -0,0 +1,16 @@ + + + + + Entities.Subjects + {2E65BE48-C962-4F0D-A293-744E21F0FFD3} + Microsoft.Data.Tools.Schema.Sql.SqlAzureV12DatabaseSchemaProvider + 1033, CI + + + + + + + + \ No newline at end of file diff --git a/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs b/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs index 4db8b7a9..867d83f2 100644 --- a/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs +++ b/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs @@ -35,7 +35,14 @@ public async Task> AddBusinessAsync(IBusinessObject busin { if (businessInfo == null) return Result.Failure("Cannot add. Business is null."); - var businessResult = await _context.Business.AddAsync((BusinessEntity)businessInfo, cancellationToken); + + var businessEntity = new BusinessEntity + { + BusinessName = businessInfo.BusinessName, + TaxNumber = businessInfo.TaxNumber + }; + + var businessResult = await _context.Business.AddAsync(businessEntity, cancellationToken); try { From 0809631542a977a2ce2d1c23bc764069c9f39a28 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Thu, 15 Jun 2023 21:25:35 -0700 Subject: [PATCH 04/26] Added CopyPropertiesSafe --- .../DomainEntity/DomainEntity.cs | 6 +- .../Extensions/ObjectExtensions.cs | 157 ++++++++++++++++++ .../Extensions/TypeExtensions.cs | 51 ++++++ src/Subjects/Core/Domain/Domain.csproj | 1 + .../Controllers/BusinessController.cs | 11 +- .../Api.WebApi/Goodtocode.Subjects.WebApi.xml | 4 +- 6 files changed, 222 insertions(+), 8 deletions(-) create mode 100644 src/Subjects/Common/Common.Domain/Extensions/ObjectExtensions.cs create mode 100644 src/Subjects/Common/Common.Domain/Extensions/TypeExtensions.cs diff --git a/src/Subjects/Common/Common.Domain/DomainEntity/DomainEntity.cs b/src/Subjects/Common/Common.Domain/DomainEntity/DomainEntity.cs index e5c32b4b..c644de60 100644 --- a/src/Subjects/Common/Common.Domain/DomainEntity/DomainEntity.cs +++ b/src/Subjects/Common/Common.Domain/DomainEntity/DomainEntity.cs @@ -1,4 +1,4 @@ -using Goodtocode.Common.Domain; +using Goodtocode.Common.Extensions; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; @@ -76,11 +76,11 @@ public override int GetHashCode() return (GetRealType().ToString() + Key).GetHashCode(); } - private Type GetRealType() + private Type GetRealType(string namespaceRoot = "") { var type = GetType(); - if (type.ToString().Contains("Goodtocode.Subjects")) + if (type.ToString().Contains(namespaceRoot)) return type.BaseType ?? type.GetType(); return type; diff --git a/src/Subjects/Common/Common.Domain/Extensions/ObjectExtensions.cs b/src/Subjects/Common/Common.Domain/Extensions/ObjectExtensions.cs new file mode 100644 index 00000000..781d975a --- /dev/null +++ b/src/Subjects/Common/Common.Domain/Extensions/ObjectExtensions.cs @@ -0,0 +1,157 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +namespace Goodtocode.Common.Extensions +{ + /// + /// object Extensions + /// + public static class ObjectExtension + { + /// + /// Get list of properties decorated with the passed attribute + /// + /// + /// + /// + public static IEnumerable GetPropertiesByAttribute(this object item, Type myAttribute) + { + var returnValue = item.GetType().GetTypeInfo().DeclaredProperties.Where( + p => p.GetCustomAttributes(myAttribute, false).Any()); + + return returnValue; + } + + /// + /// Safe Type Casting based on .NET default() method + /// + /// default(DestinationType) + /// Item to default. + /// default(DestinationType) + public static TDestination? DefaultSafe(this object item) + { + var returnValue = TypeExtension.InvokeConstructorOrDefault(); + + try + { + if (item != null) + { + returnValue = (TDestination)item; + } + } + catch + { + returnValue = TypeExtension.InvokeConstructorOrDefault(); + } + + return returnValue; + } + + /// + /// Safe type casting via (TDestination)item method. + /// If cast fails, will return constructed object + /// + /// Type to default, or create new() + /// Item to cast + /// Cast result via (TDestination)item, or item.Fill(), or new TDestination(). + public static TDestination CastSafe(this object item) where TDestination : new() + { + var returnValue = new TDestination(); + + try + { + returnValue = item != null ? (TDestination)item : returnValue; + } + catch (InvalidCastException) + { + returnValue = new TDestination(); + } + + return returnValue; + } + + /// + /// Safe Type Casting based on Default.{Type} conventions. + /// If cast fails, will attempt the slower Fill() of data via reflection + /// + /// Type to default, or create new() + /// Item to cast + /// Defaulted type, or created new() + public static TDestination CastOrCopyProperties(this object item) where TDestination : new() + { + var returnValue = new TDestination(); + + try + { + returnValue = item != null ? (TDestination)item : returnValue; + } + catch (InvalidCastException) + { + returnValue.CopyPropertiesSafe(item); + } + + return returnValue; + } + + /// + /// Safe Type Casting based on Default.{Type} conventions. + /// If cast fails, will attempt the slower Fill() of data via reflection + /// + /// Type to default, or create new() + /// Item to cast + /// Defaulted type, or created new() + public static TDestination CopyPropertiesSafe(this object item) where TDestination : new() + { + var returnValue = new TDestination(); + returnValue.CopyPropertiesSafe(item); + return returnValue; + } + + /// + /// Item to exception-safe cast to string + /// + /// Item to cast + /// Converted string, or "" + public static string? ToStringSafe(this object item) + { + var returnValue = string.Empty; + + if (item == null == false) + { + returnValue = item.ToString(); + } + + return returnValue; + } + + + /// + /// Fills this object with another object's data, by matching property names + /// + /// Type of original object. + /// Destination object to fill + /// Source object + public static void CopyPropertiesSafe(this T item, object sourceItem) + { + var sourceType = sourceItem.GetType(); + + foreach (PropertyInfo sourceProperty in sourceType.GetRuntimeProperties()) + { + PropertyInfo? destinationProperty = typeof(T).GetRuntimeProperty(sourceProperty.Name); + if (destinationProperty != null && destinationProperty.CanWrite) + { + // Copy data only for Primitive-ish types including Value types, Guid, String, etc. + Type destinationPropertyType = destinationProperty.PropertyType; + if (destinationPropertyType.GetTypeInfo().IsPrimitive || destinationPropertyType.GetTypeInfo().IsValueType + || (destinationPropertyType == typeof(string)) || (destinationPropertyType == typeof(Guid))) + { + destinationProperty.SetValue(item, sourceProperty.GetValue(sourceItem, null), null); + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Subjects/Common/Common.Domain/Extensions/TypeExtensions.cs b/src/Subjects/Common/Common.Domain/Extensions/TypeExtensions.cs new file mode 100644 index 00000000..f849a4bb --- /dev/null +++ b/src/Subjects/Common/Common.Domain/Extensions/TypeExtensions.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +namespace Goodtocode.Common.Extensions +{ + /// + /// Extends System.Type + /// + public static class TypeExtension + { + /// + /// Invokes the parameterless constructor. If no parameterless constructor, returns default() + /// + /// Type to invoke + public static T? InvokeConstructorOrDefault() + { + var returnValue = default(T); + + if (TypeExtension.HasParameterlessConstructor()) + { + returnValue = Activator.CreateInstance(); + } + + return returnValue; + } + + /// + /// Determines if type has a parameterless constructor + /// + /// Type to interrogate for parameterless constructor + /// + public static bool HasParameterlessConstructor() + { + IEnumerable constructors = typeof(T).GetTypeInfo().DeclaredConstructors; + return constructors.Where(x => x.GetParameters().Count() == 0).Any(); + } + + /// + /// Determines if type has a parameterless constructor + /// + /// Type to interrogate for parameterless constructor + /// + public static bool HasParameterlessConstructor(this Type item) + { + IEnumerable constructors = item.GetTypeInfo().DeclaredConstructors; + return constructors.Where(x => x.GetParameters().Count() == 0).Any(); + } + } +} \ No newline at end of file diff --git a/src/Subjects/Core/Domain/Domain.csproj b/src/Subjects/Core/Domain/Domain.csproj index 352e1839..42fb59aa 100644 --- a/src/Subjects/Core/Domain/Domain.csproj +++ b/src/Subjects/Core/Domain/Domain.csproj @@ -9,6 +9,7 @@ false + diff --git a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs b/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs index da1b83b6..75b4efd5 100644 --- a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs +++ b/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs @@ -1,4 +1,5 @@ -using Goodtocode.Subjects.Application; +using Goodtocode.Common.Extensions; +using Goodtocode.Subjects.Application; using Goodtocode.Subjects.Domain; using Goodtocode.Subjects.WebApi.Common; using Microsoft.AspNetCore.Mvc; @@ -68,8 +69,9 @@ public async Task Get(Guid key) [ProducesResponseType(StatusCodes.Status201Created)] [ProducesResponseType(StatusCodes.Status400BadRequest)] [ProducesResponseType(StatusCodes.Status409Conflict)] - public async Task Put([FromBody] AddBusinessCommand command) + public async Task Put([FromBody] BusinessObject business) { + var command = business.CopyPropertiesSafe(); var createdEntity = await Mediator.Send(command); return Created(new Uri($"{Request.Path}/{createdEntity.Key}", UriKind.Relative), createdEntity); @@ -92,8 +94,11 @@ public async Task Put([FromBody] AddBusinessCommand command) [HttpPost(Name = "UpdateBusinessCommand")] [ProducesResponseType(StatusCodes.Status201Created)] [ProducesResponseType(StatusCodes.Status400BadRequest)] - public async Task Post(Guid businessKey, [FromBody] UpdateBusinessCommand command) + public async Task Post(Guid businessKey, [FromBody] BusinessObject business) { + + var command = business.CopyPropertiesSafe(); + command.BusinessKey = businessKey; await Mediator.Send(command); return Ok(); diff --git a/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml b/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml index e970f95b..c2c97900 100644 --- a/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml +++ b/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml @@ -70,7 +70,7 @@ BusinessEntity - + Add Business @@ -85,7 +85,7 @@ Created Item URI and Object - + Update Business From 38c83d1abbd101b0a1f476f67dd1246e45a098f1 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Thu, 15 Jun 2023 21:28:27 -0700 Subject: [PATCH 05/26] Added casting --- .../Presentation/Api.WebApi/Controllers/BusinessController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs b/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs index 75b4efd5..ff6ff4f6 100644 --- a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs +++ b/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs @@ -100,7 +100,7 @@ public async Task Post(Guid businessKey, [FromBody] BusinessObject var command = business.CopyPropertiesSafe(); command.BusinessKey = businessKey; await Mediator.Send(command); - + return Ok(); } } \ No newline at end of file From 50ddbaa877edadea9fc5e589004ca7de42c6afb6 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sat, 17 Jun 2023 21:23:38 -0700 Subject: [PATCH 06/26] Add unit, delete endpoint --- .../Commands/DeleteBusinessCommand.cs | 29 ++++ .../DeleteBusinessCommandValidator.cs | 11 ++ .../Application/Interfaces/IBusinessRepo.cs | 3 + .../Persistence/Repositories/BusinessRepo.cs | 10 ++ .../Controllers/BusinessController.cs | 30 ++++ .../Api.WebApi/Goodtocode.Subjects.WebApi.xml | 16 +++ .../Application.Unit/Application.Unit.csproj | 13 +- .../Commands/AddBusinessCommand.feature | 19 +++ .../Commands/AddBusinessCommand.feature.cs | 128 ++++++++++++++++++ .../AddBusinessCommandStepDefinitions.cs | 115 ++++++++++++++++ .../UpdateBusinessCommand.feature | 0 .../UpdateBusinessCommand.feature.cs | 4 +- .../UpdateBusinessCommandStepDefinitions.cs | 2 +- .../Application.Unit/Common/ResponseTypes.cs | 1 + 14 files changed, 375 insertions(+), 6 deletions(-) create mode 100644 src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommand.cs create mode 100644 src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommandValidator.cs create mode 100644 src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature create mode 100644 src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature.cs create mode 100644 src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs rename src/Subjects/Specs/Application.Unit/Business/Commands/{Update => }/UpdateBusinessCommand.feature (100%) rename src/Subjects/Specs/Application.Unit/Business/Commands/{Update => }/UpdateBusinessCommand.feature.cs (96%) rename src/Subjects/Specs/Application.Unit/Business/Commands/{Update => }/UpdateBusinessCommandStepDefinitions.cs (98%) diff --git a/src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommand.cs b/src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommand.cs new file mode 100644 index 00000000..c9267498 --- /dev/null +++ b/src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommand.cs @@ -0,0 +1,29 @@ +using Goodtocode.Subjects.Application.Common.Exceptions; +using Goodtocode.Subjects.Domain; +using MediatR; + +namespace Goodtocode.Subjects.Application; + +public class DeleteBusinessCommand : IRequest +{ + public Guid BusinessKey { get; set; } +} + +public class DeleteBusinessCommandHandler : IRequestHandler +{ + private readonly IBusinessRepo _userBusinessRepo; + + public DeleteBusinessCommandHandler(IBusinessRepo BusinessRepo) + { + _userBusinessRepo = BusinessRepo; + } + + public async Task Handle(DeleteBusinessCommand request, CancellationToken cancellationToken) + { + var DeleteResult = + await _userBusinessRepo.DeleteBusinessAsync(request.BusinessKey, cancellationToken); + + if (DeleteResult.IsFailure) + throw new NotFoundException(DeleteResult.Error); + } +} \ No newline at end of file diff --git a/src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommandValidator.cs b/src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommandValidator.cs new file mode 100644 index 00000000..46bd3567 --- /dev/null +++ b/src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommandValidator.cs @@ -0,0 +1,11 @@ +using FluentValidation; + +namespace Goodtocode.Subjects.Application.Business.Commands; + +public class DeleteBusinessCommandValidator : AbstractValidator +{ + public DeleteBusinessCommandValidator() + { + RuleFor(y => y.BusinessKey).NotEmpty(); + } +} \ No newline at end of file diff --git a/src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs b/src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs index 787b7a33..b89afc31 100644 --- a/src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs +++ b/src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs @@ -16,4 +16,7 @@ Task> AddBusinessAsync(IBusinessObject businessInfo, Task UpdateBusinessAsync(IBusinessEntity businessInfo, CancellationToken cancellationToken); + + Task DeleteBusinessAsync(Guid businessKey, + CancellationToken cancellationToken); } \ No newline at end of file diff --git a/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs b/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs index 867d83f2..6873b5f8 100644 --- a/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs +++ b/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs @@ -68,4 +68,14 @@ public async Task UpdateBusinessAsync(IBusinessEntity businessInfo, Canc var result = await _context.SaveChangesAsync(cancellationToken); return Result.Success(); } + + public async Task DeleteBusinessAsync(Guid businessKey, CancellationToken cancellationToken) + { + var businessResult = await _context.Business.FindAsync(new object?[] { businessKey, cancellationToken }, cancellationToken: cancellationToken); + if (businessResult == null) + return Result.Failure("Cannot delete. Business not found."); + _context.Business.Remove(businessResult); + var result = await _context.SaveChangesAsync(cancellationToken); + return Result.Success(); + } } \ No newline at end of file diff --git a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs b/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs index ff6ff4f6..2dd5b0d6 100644 --- a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs +++ b/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs @@ -94,6 +94,7 @@ public async Task Put([FromBody] BusinessObject business) [HttpPost(Name = "UpdateBusinessCommand")] [ProducesResponseType(StatusCodes.Status201Created)] [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status404NotFound)] public async Task Post(Guid businessKey, [FromBody] BusinessObject business) { @@ -103,4 +104,33 @@ public async Task Post(Guid businessKey, [FromBody] BusinessObject return Ok(); } + + /// + /// Delete a Business + /// + /// + /// Sample request: + /// "BusinessKey": d3d42e6e-87c5-49d6-aec0-7995711d6612, + /// "api-version": 1 + /// HttpPost Body + /// { + /// "BusinessName": "My Business", + /// "TaxNumber": "12-445666" + /// } + /// + /// bool + [HttpPost(Name = "UpdateBusinessCommand")] + [ProducesResponseType(StatusCodes.Status204NoContent)] + [ProducesResponseType(StatusCodes.Status404NotFound)] + public async Task Delete(Guid businessKey) + { + + var command = new DeleteBusinessCommand + { + BusinessKey = businessKey + }; + await Mediator.Send(command); + + return NoContent(); + } } \ No newline at end of file diff --git a/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml b/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml index c2c97900..d4ed8425 100644 --- a/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml +++ b/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml @@ -101,6 +101,22 @@ bool + + + Delete a Business + + + Sample request: + "BusinessKey": d3d42e6e-87c5-49d6-aec0-7995711d6612, + "api-version": 1 + HttpPost Body + { + "BusinessName": "My Business", + "TaxNumber": "12-445666" + } + + bool + Businesses Controller V1.0 diff --git a/src/Subjects/Specs/Application.Unit/Application.Unit.csproj b/src/Subjects/Specs/Application.Unit/Application.Unit.csproj index d639d0b6..e102b989 100644 --- a/src/Subjects/Specs/Application.Unit/Application.Unit.csproj +++ b/src/Subjects/Specs/Application.Unit/Application.Unit.csproj @@ -11,7 +11,7 @@ - + @@ -36,7 +36,10 @@ - + + AddBusinessCommand.feature + + UpdateBusinessCommand.feature @@ -47,7 +50,11 @@ - + + $(UsingMicrosoftNETSdk) + %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) + + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature b/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature new file mode 100644 index 00000000..8d155f3a --- /dev/null +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature @@ -0,0 +1,19 @@ +@addBusinessCommand +Feature: Add Business Command +As an customer service agent +When I add business information +The business is saved in system of record + +Scenario: Add business + Given I have a def "" + And I have a BusinessName "" + And I have a TaxNumber "" + When I add the business + Then The response is "" + And If the response has validation issues I see the "" in the response + +Examples: + | def | response | responseErrors | requestBusinessName | requestTaxNumber | + | success TaxNumber Add | Success | | businessName | 123-4567 | + | success Name Add | Success | | businessName | 123-4567 | + | bad request Missing BusinessName | BadRequest | BusinessName | | 123-4567 | \ No newline at end of file diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature.cs b/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature.cs new file mode 100644 index 00000000..782c675b --- /dev/null +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature.cs @@ -0,0 +1,128 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (https://www.specflow.org/). +// SpecFlow Version:3.9.0.0 +// SpecFlow Generator Version:3.9.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +namespace Goodtocode.Subjects.Unit.Business.Commands +{ + using TechTalk.SpecFlow; + using System; + using System.Linq; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Add Business Command")] + [NUnit.Framework.CategoryAttribute("addBusinessCommand")] + public partial class AddBusinessCommandFeature + { + + private TechTalk.SpecFlow.ITestRunner testRunner; + + private static string[] featureTags = new string[] { + "addBusinessCommand"}; + +#line 1 "AddBusinessCommand.feature" +#line hidden + + [NUnit.Framework.OneTimeSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands", "Add Business Command", "As an customer service agent\r\nWhen I add business information\r\nThe business is sa" + + "ved in system of record", ProgrammingLanguage.CSharp, featureTags); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.OneTimeTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [NUnit.Framework.SetUpAttribute()] + public void TestInitialize() + { + } + + [NUnit.Framework.TearDownAttribute()] + public void TestTearDown() + { + testRunner.OnScenarioEnd(); + } + + public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); + } + + public void ScenarioStart() + { + testRunner.OnScenarioStart(); + } + + public void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Add business")] + [NUnit.Framework.TestCaseAttribute("success TaxNumber Add", "Success", "", "businessName", "123-4567", null)] + [NUnit.Framework.TestCaseAttribute("success Name Add", "Success", "", "businessName", "123-4567", null)] + [NUnit.Framework.TestCaseAttribute("bad request Missing BusinessName", "BadRequest", "BusinessName", "", "123-4567", null)] + public void AddBusiness(string def, string response, string responseErrors, string requestBusinessName, string requestTaxNumber, string[] exampleTags) + { + string[] tagsOfScenario = exampleTags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("def", def); + argumentsOfScenario.Add("response", response); + argumentsOfScenario.Add("responseErrors", responseErrors); + argumentsOfScenario.Add("requestBusinessName", requestBusinessName); + argumentsOfScenario.Add("requestTaxNumber", requestTaxNumber); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add business", null, tagsOfScenario, argumentsOfScenario, featureTags); +#line 7 +this.ScenarioInitialize(scenarioInfo); +#line hidden + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 8 + testRunner.Given(string.Format("I have a def \"{0}\"", def), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 9 + testRunner.And(string.Format("I have a BusinessName \"{0}\"", requestBusinessName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 10 + testRunner.And(string.Format("I have a TaxNumber \"{0}\"", requestTaxNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 11 + testRunner.When("I add the business", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 12 + testRunner.Then(string.Format("The response is \"{0}\"", response), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 13 + testRunner.And(string.Format("If the response has validation issues I see the \"{0}\" in the response", responseErrors), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs b/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs new file mode 100644 index 00000000..8ebd6f17 --- /dev/null +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs @@ -0,0 +1,115 @@ +using FluentValidation.Results; +using Goodtocode.Subjects.Application; +using Goodtocode.Subjects.Application.Business.Commands; +using Goodtocode.Subjects.Application.Common.Exceptions; +using Moq; +using System.Collections.Concurrent; +using static Goodtocode.Subjects.Unit.Common.ResponseTypes; + +namespace Goodtocode.Subjects.Unit.Business.Commands; + +[Binding] +[Scope(Tag = "addBusinessCommand")] +public class AddBusinessCommandStepDefinitions : TestBase +{ + private IDictionary _commandErrors = new ConcurrentDictionary(); + private string[]? _expectedInvalidFields; + private string _businessName = string.Empty; + private string _taxNumber = string.Empty; + private object _responseType = string.Empty; + private ValidationResult _validationErrors = new(); + + [Given(@"I have a def ""([^""]*)""")] + public void GivenIHaveADef(string def) + { + _def = def; + } + + [Given(@"I have a BusinessName ""([^""]*)""")] + public void GivenIHaveABusinessName(string businessName) + { + _businessName = businessName; + } + + [Given(@"I have a TaxNumber ""([^""]*)""")] + public void GivenIHaveATaxNumber(string taxNumber) + { + _taxNumber = taxNumber; + } + + [When(@"I add the business")] + public async Task WhenIAddTheBusiness() + { + var userBusinessRepoMock = new Mock(); + + var request = new AddBusinessCommand + { + BusinessName = _businessName, + TaxNumber = _taxNumber + }; + + var requestValidator = new AddBusinessCommandValidator(); + + _validationErrors = await requestValidator.ValidateAsync(request); + + if (_validationErrors.IsValid) + try + { + var handler = new AddBusinessCommandHandler(userBusinessRepoMock.Object); + await handler.Handle(request, CancellationToken.None); + _responseType = CommandResponseType.Successful; + } + catch (Exception e) + { + switch (e) + { + case ValidationException validationException: + _commandErrors = validationException.Errors; + _responseType = CommandResponseType.BadRequest; + break; + case ConflictException conflictException: + _responseType = CommandResponseType.Conflict; + break; + default: + _responseType = CommandResponseType.Error; + break; + } + } + else + _responseType = CommandResponseType.BadRequest; + } + + [Then(@"The response is ""([^""]*)""")] + public void ThenTheResponseIs(string response) + { + switch (response) + { + case "Success": + _responseType.Should().Be(CommandResponseType.Successful); + break; + case "BadRequest": + _responseType.Should().Be(CommandResponseType.BadRequest); + break; + case "Conflict": + _responseType.Should().Be(CommandResponseType.Conflict); + break; + } + } + + [Then(@"If the response has validation issues I see the ""([^""]*)"" in the response")] + public void ThenIfTheResponseHasValidationIssuesISeeTheInTheResponse(string expectedInvalidFields) + { + if (string.IsNullOrWhiteSpace(expectedInvalidFields)) return; + + _expectedInvalidFields = expectedInvalidFields.Split(","); + + foreach (var field in _expectedInvalidFields) + { + var hasCommandValidatorErrors = _validationErrors.Errors.Any(x => x.PropertyName == field.Trim()); + var hasCommandErrors = _commandErrors.Any(x => x.Key == field.Trim()); + var hasErrorMatch = hasCommandErrors || hasCommandValidatorErrors; + + hasErrorMatch.Should().BeTrue(); + } + } +} \ No newline at end of file diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/Update/UpdateBusinessCommand.feature b/src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommand.feature similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/Update/UpdateBusinessCommand.feature rename to src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommand.feature diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/Update/UpdateBusinessCommand.feature.cs b/src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommand.feature.cs similarity index 96% rename from src/Subjects/Specs/Application.Unit/Business/Commands/Update/UpdateBusinessCommand.feature.cs rename to src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommand.feature.cs index 0ff74c16..10d6d898 100644 --- a/src/Subjects/Specs/Application.Unit/Business/Commands/Update/UpdateBusinessCommand.feature.cs +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommand.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Unit.Business.Commands.Update +namespace Goodtocode.Subjects.Unit.Business.Commands { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class UpdateBusinessCommandFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands/Update", "Update Business Command", "As an customer service agent\r\nI can change business information\r\nAnd get the syst" + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands", "Update Business Command", "As an customer service agent\r\nI can change business information\r\nAnd get the syst" + "em of record updated", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/Update/UpdateBusinessCommandStepDefinitions.cs b/src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs similarity index 98% rename from src/Subjects/Specs/Application.Unit/Business/Commands/Update/UpdateBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs index ccb5e26e..a3860261 100644 --- a/src/Subjects/Specs/Application.Unit/Business/Commands/Update/UpdateBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs @@ -6,7 +6,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Unit.Common.ResponseTypes; -namespace Goodtocode.Subjects.Unit.Business.Commands.Update; +namespace Goodtocode.Subjects.Unit.Business.Commands; [Binding] [Scope(Tag = "updateBusinessCommand")] diff --git a/src/Subjects/Specs/Application.Unit/Common/ResponseTypes.cs b/src/Subjects/Specs/Application.Unit/Common/ResponseTypes.cs index fd13d5c3..cb9c386d 100644 --- a/src/Subjects/Specs/Application.Unit/Common/ResponseTypes.cs +++ b/src/Subjects/Specs/Application.Unit/Common/ResponseTypes.cs @@ -7,6 +7,7 @@ public enum CommandResponseType Successful, BadRequest, NotFound, + Conflict, Error } } From 5ed4f516da9fe48fe9b56545ea2c7579ee2c3dbc Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sat, 17 Jun 2023 22:06:24 -0700 Subject: [PATCH 07/26] Incremental --- .../Application.Integration.csproj | 10 ++ .../Commands/DeleteBusinessCommand.feature | 19 +++ .../Commands/DeleteBusinessCommand.feature.cs | 125 ++++++++++++++++++ .../DeleteBusinessCommandStepDefinitions.cs | 109 +++++++++++++++ .../Common/ResponseTypes.cs | 1 + .../Application.Unit/Application.Unit.csproj | 7 + .../Commands/DeleteBusinessCommand.feature | 19 +++ .../Commands/DeleteBusinessCommand.feature.cs | 125 ++++++++++++++++++ .../DeleteBusinessCommandStepDefinitions.cs | 109 +++++++++++++++ 9 files changed, 524 insertions(+) create mode 100644 src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature create mode 100644 src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs create mode 100644 src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs create mode 100644 src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature create mode 100644 src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs create mode 100644 src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Integration/Application.Integration.csproj b/src/Subjects/Specs/Application.Integration/Application.Integration.csproj index 183a418b..fe101319 100644 --- a/src/Subjects/Specs/Application.Integration/Application.Integration.csproj +++ b/src/Subjects/Specs/Application.Integration/Application.Integration.csproj @@ -39,6 +39,12 @@ + + true + %(Filename) + true + true + UpdateBusinessCommand.feature @@ -50,6 +56,10 @@ + + $(UsingMicrosoftNETSdk) + %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature new file mode 100644 index 00000000..b7833470 --- /dev/null +++ b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature @@ -0,0 +1,19 @@ +@deleteBusinessCommand +Feature: Delete Business Command +As an customer service agent +I delete the business +The business is deleted from the system of record + +Scenario: Delete business + Given I have a def "" + And I have a BusinessKey "" + When I delete the business + Then The response is "" + And If the response has validation issues I see the "" in the response + +Examples: + | def | response | responseErrors | requestBusinessKey | + | success TaxNumber BusinessKey | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | + | not found BusinessKey | NotFound | BusinessKey | d1123a05-f123-4123-8123-851231234f1a | + | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | + | bad request non-guid BusinessKey | BadRequest | BusinessKey | 11111 | \ No newline at end of file diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs new file mode 100644 index 00000000..9f53b39e --- /dev/null +++ b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs @@ -0,0 +1,125 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (https://www.specflow.org/). +// SpecFlow Version:3.9.0.0 +// SpecFlow Generator Version:3.9.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +namespace Goodtocode.Subjects.Integration.Business.Commands +{ + using TechTalk.SpecFlow; + using System; + using System.Linq; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete Business Command")] + [NUnit.Framework.CategoryAttribute("deleteBusinessCommand")] + public partial class DeleteBusinessCommandFeature + { + + private TechTalk.SpecFlow.ITestRunner testRunner; + + private static string[] featureTags = new string[] { + "deleteBusinessCommand"}; + +#line 1 "DeleteBusinessCommand.feature" +#line hidden + + [NUnit.Framework.OneTimeSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands", "Delete Business Command", "As an customer service agent\r\nI delete the business\r\nThe business is deleted from" + + " the system of record", ProgrammingLanguage.CSharp, featureTags); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.OneTimeTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [NUnit.Framework.SetUpAttribute()] + public void TestInitialize() + { + } + + [NUnit.Framework.TearDownAttribute()] + public void TestTearDown() + { + testRunner.OnScenarioEnd(); + } + + public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); + } + + public void ScenarioStart() + { + testRunner.OnScenarioStart(); + } + + public void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete business")] + [NUnit.Framework.TestCaseAttribute("success TaxNumber BusinessKey", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", null)] + [NUnit.Framework.TestCaseAttribute("not found BusinessKey", "NotFound", "BusinessKey", "d1123a05-f123-4123-8123-851231234f1a", null)] + [NUnit.Framework.TestCaseAttribute("bad request Empty BusinessKey", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", null)] + [NUnit.Framework.TestCaseAttribute("bad request non-guid BusinessKey", "BadRequest", "BusinessKey", "11111", null)] + public void DeleteBusiness(string def, string response, string responseErrors, string requestBusinessKey, string[] exampleTags) + { + string[] tagsOfScenario = exampleTags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("def", def); + argumentsOfScenario.Add("response", response); + argumentsOfScenario.Add("responseErrors", responseErrors); + argumentsOfScenario.Add("requestBusinessKey", requestBusinessKey); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete business", null, tagsOfScenario, argumentsOfScenario, featureTags); +#line 7 +this.ScenarioInitialize(scenarioInfo); +#line hidden + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 8 + testRunner.Given(string.Format("I have a def \"{0}\"", def), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 9 + testRunner.And(string.Format("I have a BusinessKey \"{0}\"", requestBusinessKey), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 10 + testRunner.When("I delete the business", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 11 + testRunner.Then(string.Format("The response is \"{0}\"", response), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 12 + testRunner.And(string.Format("If the response has validation issues I see the \"{0}\" in the response", responseErrors), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs new file mode 100644 index 00000000..1ffc7a31 --- /dev/null +++ b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs @@ -0,0 +1,109 @@ +using FluentValidation.Results; +using Goodtocode.Subjects.Application; +using Goodtocode.Subjects.Application.Business.Commands; +using Goodtocode.Subjects.Application.Common.Exceptions; +using Moq; +using System.Collections.Concurrent; +using static Goodtocode.Subjects.Integration.Common.ResponseTypes; + +namespace Goodtocode.Subjects.Integration.Business.Commands; + +[Binding] +[Scope(Tag = "deleteBusinessCommand")] +public class DeleteBusinessCommandStepDefinitions : TestBase +{ + private IDictionary _commandErrors = new ConcurrentDictionary(); + private string[]? _expectedInvalidFields; + private Guid _businessKey; + private string _businessName = string.Empty; + private string _taxNumber = string.Empty; + private object _responseType = string.Empty; + private ValidationResult _validationErrors = new(); + + [Given(@"I have a def ""([^""]*)""")] + public void GivenIHaveADef(string def) + { + _def = def; + } + + [Given(@"I have a BusinessKey ""([^""]*)""")] + public void GivenIHaveABusinessKey(string businessKey) + { + Guid.TryParse(businessKey, out _businessKey); + } + + [When(@"I delete the business")] + public async Task WhenIDeleteTheBusiness() + { + var userBusinessRepoMock = new Mock(); + + var request = new DeleteBusinessCommand + { + BusinessKey = _businessKey, + }; + + var requestValidator = new DeleteBusinessCommandValidator(); + + _validationErrors = await requestValidator.ValidateAsync(request); + + if (_validationErrors.IsValid) + try + { + var handler = new DeleteBusinessCommandHandler(userBusinessRepoMock.Object); + await handler.Handle(request, CancellationToken.None); + _responseType = CommandResponseType.Successful; + } + catch (Exception e) + { + switch (e) + { + case ValidationException validationException: + _commandErrors = validationException.Errors; + _responseType = CommandResponseType.BadRequest; + break; + case NotFoundException notFoundException: + _responseType = CommandResponseType.NotFound; + break; + default: + _responseType = CommandResponseType.Error; + break; + } + } + else + _responseType = CommandResponseType.BadRequest; + } + + [Then(@"The response is ""([^""]*)""")] + public void ThenTheResponseIs(string response) + { + switch (response) + { + case "Success": + _responseType.Should().Be(CommandResponseType.Successful); + break; + case "BadRequest": + _responseType.Should().Be(CommandResponseType.BadRequest); + break; + case "NotFound": + _responseType.Should().Be(CommandResponseType.NotFound); + break; + } + } + + [Then(@"If the response has validation issues I see the ""([^""]*)"" in the response")] + public void ThenIfTheResponseHasValidationIssuesISeeTheInTheResponse(string expectedInvalidFields) + { + if (string.IsNullOrWhiteSpace(expectedInvalidFields)) return; + + _expectedInvalidFields = expectedInvalidFields.Split(","); + + foreach (var field in _expectedInvalidFields) + { + var hasCommandValidatorErrors = _validationErrors.Errors.Any(x => x.PropertyName == field.Trim()); + var hasCommandErrors = _commandErrors.Any(x => x.Key == field.Trim()); + var hasErrorMatch = hasCommandErrors || hasCommandValidatorErrors; + + hasErrorMatch.Should().BeTrue(); + } + } +} \ No newline at end of file diff --git a/src/Subjects/Specs/Application.Integration/Common/ResponseTypes.cs b/src/Subjects/Specs/Application.Integration/Common/ResponseTypes.cs index 06361e3e..be470f53 100644 --- a/src/Subjects/Specs/Application.Integration/Common/ResponseTypes.cs +++ b/src/Subjects/Specs/Application.Integration/Common/ResponseTypes.cs @@ -7,6 +7,7 @@ public enum CommandResponseType Successful, BadRequest, NotFound, + Conflict, Error } } diff --git a/src/Subjects/Specs/Application.Unit/Application.Unit.csproj b/src/Subjects/Specs/Application.Unit/Application.Unit.csproj index e102b989..a8a396e2 100644 --- a/src/Subjects/Specs/Application.Unit/Application.Unit.csproj +++ b/src/Subjects/Specs/Application.Unit/Application.Unit.csproj @@ -39,6 +39,9 @@ AddBusinessCommand.feature + + DeleteBusinessCommand.feature + UpdateBusinessCommand.feature @@ -54,6 +57,10 @@ $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) + + $(UsingMicrosoftNETSdk) + %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature new file mode 100644 index 00000000..b7833470 --- /dev/null +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature @@ -0,0 +1,19 @@ +@deleteBusinessCommand +Feature: Delete Business Command +As an customer service agent +I delete the business +The business is deleted from the system of record + +Scenario: Delete business + Given I have a def "" + And I have a BusinessKey "" + When I delete the business + Then The response is "" + And If the response has validation issues I see the "" in the response + +Examples: + | def | response | responseErrors | requestBusinessKey | + | success TaxNumber BusinessKey | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | + | not found BusinessKey | NotFound | BusinessKey | d1123a05-f123-4123-8123-851231234f1a | + | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | + | bad request non-guid BusinessKey | BadRequest | BusinessKey | 11111 | \ No newline at end of file diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs new file mode 100644 index 00000000..84b95dd2 --- /dev/null +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs @@ -0,0 +1,125 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (https://www.specflow.org/). +// SpecFlow Version:3.9.0.0 +// SpecFlow Generator Version:3.9.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +namespace Goodtocode.Subjects.Unit.Business.Commands +{ + using TechTalk.SpecFlow; + using System; + using System.Linq; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete Business Command")] + [NUnit.Framework.CategoryAttribute("deleteBusinessCommand")] + public partial class DeleteBusinessCommandFeature + { + + private TechTalk.SpecFlow.ITestRunner testRunner; + + private static string[] featureTags = new string[] { + "deleteBusinessCommand"}; + +#line 1 "DeleteBusinessCommand.feature" +#line hidden + + [NUnit.Framework.OneTimeSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands", "Delete Business Command", "As an customer service agent\r\nI delete the business\r\nThe business is deleted from" + + " the system of record", ProgrammingLanguage.CSharp, featureTags); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.OneTimeTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [NUnit.Framework.SetUpAttribute()] + public void TestInitialize() + { + } + + [NUnit.Framework.TearDownAttribute()] + public void TestTearDown() + { + testRunner.OnScenarioEnd(); + } + + public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); + } + + public void ScenarioStart() + { + testRunner.OnScenarioStart(); + } + + public void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Delete business")] + [NUnit.Framework.TestCaseAttribute("success TaxNumber BusinessKey", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", null)] + [NUnit.Framework.TestCaseAttribute("not found BusinessKey", "NotFound", "BusinessKey", "d1123a05-f123-4123-8123-851231234f1a", null)] + [NUnit.Framework.TestCaseAttribute("bad request Empty BusinessKey", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", null)] + [NUnit.Framework.TestCaseAttribute("bad request non-guid BusinessKey", "BadRequest", "BusinessKey", "11111", null)] + public void DeleteBusiness(string def, string response, string responseErrors, string requestBusinessKey, string[] exampleTags) + { + string[] tagsOfScenario = exampleTags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("def", def); + argumentsOfScenario.Add("response", response); + argumentsOfScenario.Add("responseErrors", responseErrors); + argumentsOfScenario.Add("requestBusinessKey", requestBusinessKey); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Delete business", null, tagsOfScenario, argumentsOfScenario, featureTags); +#line 7 +this.ScenarioInitialize(scenarioInfo); +#line hidden + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 8 + testRunner.Given(string.Format("I have a def \"{0}\"", def), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 9 + testRunner.And(string.Format("I have a BusinessKey \"{0}\"", requestBusinessKey), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 10 + testRunner.When("I delete the business", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 11 + testRunner.Then(string.Format("The response is \"{0}\"", response), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 12 + testRunner.And(string.Format("If the response has validation issues I see the \"{0}\" in the response", responseErrors), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs new file mode 100644 index 00000000..b91ff2d3 --- /dev/null +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs @@ -0,0 +1,109 @@ +using FluentValidation.Results; +using Goodtocode.Subjects.Application; +using Goodtocode.Subjects.Application.Business.Commands; +using Goodtocode.Subjects.Application.Common.Exceptions; +using Moq; +using System.Collections.Concurrent; +using static Goodtocode.Subjects.Unit.Common.ResponseTypes; + +namespace Goodtocode.Subjects.Unit.Business.Commands; + +[Binding] +[Scope(Tag = "deleteBusinessCommand")] +public class DeleteBusinessCommandStepDefinitions : TestBase +{ + private IDictionary _commandErrors = new ConcurrentDictionary(); + private string[]? _expectedInvalidFields; + private Guid _businessKey; + private string _businessName = string.Empty; + private string _taxNumber = string.Empty; + private object _responseType = string.Empty; + private ValidationResult _validationErrors = new(); + + [Given(@"I have a def ""([^""]*)""")] + public void GivenIHaveADef(string def) + { + _def = def; + } + + [Given(@"I have a BusinessKey ""([^""]*)""")] + public void GivenIHaveABusinessKey(string businessKey) + { + Guid.TryParse(businessKey, out _businessKey); + } + + [When(@"I delete the business")] + public async Task WhenIDeleteTheBusiness() + { + var userBusinessRepoMock = new Mock(); + + var request = new DeleteBusinessCommand + { + BusinessKey = _businessKey, + }; + + var requestValidator = new DeleteBusinessCommandValidator(); + + _validationErrors = await requestValidator.ValidateAsync(request); + + if (_validationErrors.IsValid) + try + { + var handler = new DeleteBusinessCommandHandler(userBusinessRepoMock.Object); + await handler.Handle(request, CancellationToken.None); + _responseType = CommandResponseType.Successful; + } + catch (Exception e) + { + switch (e) + { + case ValidationException validationException: + _commandErrors = validationException.Errors; + _responseType = CommandResponseType.BadRequest; + break; + case NotFoundException notFoundException: + _responseType = CommandResponseType.NotFound; + break; + default: + _responseType = CommandResponseType.Error; + break; + } + } + else + _responseType = CommandResponseType.BadRequest; + } + + [Then(@"The response is ""([^""]*)""")] + public void ThenTheResponseIs(string response) + { + switch (response) + { + case "Success": + _responseType.Should().Be(CommandResponseType.Successful); + break; + case "BadRequest": + _responseType.Should().Be(CommandResponseType.BadRequest); + break; + case "NotFound": + _responseType.Should().Be(CommandResponseType.NotFound); + break; + } + } + + [Then(@"If the response has validation issues I see the ""([^""]*)"" in the response")] + public void ThenIfTheResponseHasValidationIssuesISeeTheInTheResponse(string expectedInvalidFields) + { + if (string.IsNullOrWhiteSpace(expectedInvalidFields)) return; + + _expectedInvalidFields = expectedInvalidFields.Split(","); + + foreach (var field in _expectedInvalidFields) + { + var hasCommandValidatorErrors = _validationErrors.Errors.Any(x => x.PropertyName == field.Trim()); + var hasCommandErrors = _commandErrors.Any(x => x.Key == field.Trim()); + var hasErrorMatch = hasCommandErrors || hasCommandValidatorErrors; + + hasErrorMatch.Should().BeTrue(); + } + } +} \ No newline at end of file From 5d6e3d09e2c0d0ad5859f87e382dbbfd3805b3ba Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 10:01:16 -0700 Subject: [PATCH 08/26] Removed untestable scenario --- .../Business/Commands/DeleteBusinessCommand.feature | 1 - .../Business/Commands/DeleteBusinessCommand.feature.cs | 1 - .../Business/Commands/DeleteBusinessCommand.feature | 1 - .../Business/Commands/DeleteBusinessCommand.feature.cs | 1 - .../Business/Commands/DeleteBusinessCommandStepDefinitions.cs | 2 -- 5 files changed, 6 deletions(-) diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature index b7833470..8788d922 100644 --- a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature +++ b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature @@ -14,6 +14,5 @@ Scenario: Delete business Examples: | def | response | responseErrors | requestBusinessKey | | success TaxNumber BusinessKey | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | - | not found BusinessKey | NotFound | BusinessKey | d1123a05-f123-4123-8123-851231234f1a | | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | | bad request non-guid BusinessKey | BadRequest | BusinessKey | 11111 | \ No newline at end of file diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs index 9f53b39e..29b6d7c3 100644 --- a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs +++ b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs @@ -79,7 +79,6 @@ public void ScenarioCleanup() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Delete business")] [NUnit.Framework.TestCaseAttribute("success TaxNumber BusinessKey", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", null)] - [NUnit.Framework.TestCaseAttribute("not found BusinessKey", "NotFound", "BusinessKey", "d1123a05-f123-4123-8123-851231234f1a", null)] [NUnit.Framework.TestCaseAttribute("bad request Empty BusinessKey", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", null)] [NUnit.Framework.TestCaseAttribute("bad request non-guid BusinessKey", "BadRequest", "BusinessKey", "11111", null)] public void DeleteBusiness(string def, string response, string responseErrors, string requestBusinessKey, string[] exampleTags) diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature index b7833470..8788d922 100644 --- a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature @@ -14,6 +14,5 @@ Scenario: Delete business Examples: | def | response | responseErrors | requestBusinessKey | | success TaxNumber BusinessKey | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | - | not found BusinessKey | NotFound | BusinessKey | d1123a05-f123-4123-8123-851231234f1a | | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | | bad request non-guid BusinessKey | BadRequest | BusinessKey | 11111 | \ No newline at end of file diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs index 84b95dd2..8424f2bf 100644 --- a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs @@ -79,7 +79,6 @@ public void ScenarioCleanup() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Delete business")] [NUnit.Framework.TestCaseAttribute("success TaxNumber BusinessKey", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", null)] - [NUnit.Framework.TestCaseAttribute("not found BusinessKey", "NotFound", "BusinessKey", "d1123a05-f123-4123-8123-851231234f1a", null)] [NUnit.Framework.TestCaseAttribute("bad request Empty BusinessKey", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", null)] [NUnit.Framework.TestCaseAttribute("bad request non-guid BusinessKey", "BadRequest", "BusinessKey", "11111", null)] public void DeleteBusiness(string def, string response, string responseErrors, string requestBusinessKey, string[] exampleTags) diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs index b91ff2d3..4f5413b7 100644 --- a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs @@ -15,8 +15,6 @@ public class DeleteBusinessCommandStepDefinitions : TestBase private IDictionary _commandErrors = new ConcurrentDictionary(); private string[]? _expectedInvalidFields; private Guid _businessKey; - private string _businessName = string.Empty; - private string _taxNumber = string.Empty; private object _responseType = string.Empty; private ValidationResult _validationErrors = new(); From 2de74ae0da36f00f14a55d66fb06bdaf29c65bca Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 14:21:07 -0700 Subject: [PATCH 09/26] Added live repo to Integration --- .../Business/Commands/DeleteBusinessCommand.feature | 1 + .../Business/Commands/DeleteBusinessCommand.feature.cs | 1 + .../Commands/DeleteBusinessCommandStepDefinitions.cs | 7 +------ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature index 8788d922..c2967d75 100644 --- a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature +++ b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature @@ -14,5 +14,6 @@ Scenario: Delete business Examples: | def | response | responseErrors | requestBusinessKey | | success TaxNumber BusinessKey | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | + | not found BusinessKey | NotFound | | 12345600-1234-1234-1234-123400000000 | | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | | bad request non-guid BusinessKey | BadRequest | BusinessKey | 11111 | \ No newline at end of file diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs index 29b6d7c3..0e36e580 100644 --- a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs +++ b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs @@ -79,6 +79,7 @@ public void ScenarioCleanup() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Delete business")] [NUnit.Framework.TestCaseAttribute("success TaxNumber BusinessKey", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", null)] + [NUnit.Framework.TestCaseAttribute("not found BusinessKey", "NotFound", "", "12345600-1234-1234-1234-123400000000", null)] [NUnit.Framework.TestCaseAttribute("bad request Empty BusinessKey", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", null)] [NUnit.Framework.TestCaseAttribute("bad request non-guid BusinessKey", "BadRequest", "BusinessKey", "11111", null)] public void DeleteBusiness(string def, string response, string responseErrors, string requestBusinessKey, string[] exampleTags) diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs index 1ffc7a31..46b78792 100644 --- a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs @@ -2,7 +2,6 @@ using Goodtocode.Subjects.Application; using Goodtocode.Subjects.Application.Business.Commands; using Goodtocode.Subjects.Application.Common.Exceptions; -using Moq; using System.Collections.Concurrent; using static Goodtocode.Subjects.Integration.Common.ResponseTypes; @@ -15,8 +14,6 @@ public class DeleteBusinessCommandStepDefinitions : TestBase private IDictionary _commandErrors = new ConcurrentDictionary(); private string[]? _expectedInvalidFields; private Guid _businessKey; - private string _businessName = string.Empty; - private string _taxNumber = string.Empty; private object _responseType = string.Empty; private ValidationResult _validationErrors = new(); @@ -35,8 +32,6 @@ public void GivenIHaveABusinessKey(string businessKey) [When(@"I delete the business")] public async Task WhenIDeleteTheBusiness() { - var userBusinessRepoMock = new Mock(); - var request = new DeleteBusinessCommand { BusinessKey = _businessKey, @@ -49,7 +44,7 @@ public async Task WhenIDeleteTheBusiness() if (_validationErrors.IsValid) try { - var handler = new DeleteBusinessCommandHandler(userBusinessRepoMock.Object); + var handler = new DeleteBusinessCommandHandler(base.BusinessRepo); await handler.Handle(request, CancellationToken.None); _responseType = CommandResponseType.Successful; } From 08440a338c6d4250958c7eb761e7ff85108727db Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 15:37:29 -0700 Subject: [PATCH 10/26] Flattened projects to root --- .../Business/Commands/AddBusinessCommand.cs | 0 .../Commands/AddBusinessCommandValidator.cs | 0 .../Commands/DeleteBusinessCommand.cs | 0 .../DeleteBusinessCommandValidator.cs | 0 .../Commands/UpdateBusinessCommand.cs | 0 .../UpdateBusinessCommandValidator.cs | 0 .../Business/Queries/GetBusinessQuery.cs | 0 .../Queries/GetBusinessQueryValidator.cs | 0 .../Queries/GetBusinessesByNameQuery.cs | 0 .../GetBusinessesByNameQueryValidator.cs | 0 .../Common/Behaviours/LoggingBehaviour.cs | 0 .../Common/Behaviours/PerformanceBehaviour.cs | 0 .../Behaviours/UnhandledExceptionBehaviour.cs | 0 .../Common/Behaviours/ValidationBehaviour.cs | 0 .../Common/Exceptions/ConflictException.cs | 0 .../Exceptions/ForbiddenAccessException.cs | 0 .../Common/Exceptions/NotFoundException.cs | 0 .../Common/Exceptions/ValidationException.cs | 0 .../Common/Mappings/IMapFrom.cs | 0 .../Common/Mappings/MappingProfile.cs | 0 .../ConfigureServices.cs | 0 .../Core.Application.csproj} | 2 +- .../Interfaces/IBusinessRepo.cs | 0 .../Interfaces/IPersonRepo.cs | 0 .../Interfaces/ISubjectsDbContext.cs | 0 .../Person/UpdatePersonCommand.cs | 0 .../Person/UpdatePersonCommandValidator.cs | 0 .../favicon.ico | Bin .../storeicon.png | Bin .../Core.Domain.csproj} | 2 +- .../Subjects/Associate/Associate.cs | 0 .../Associate/BusinessCreatedEvent.cs | 0 .../Associate/BusinessDeletedEvent.cs | 0 .../Subjects/Associate/BusinessEntity.cs | 0 .../Subjects/Associate/BusinessObject.cs | 0 .../Associate/BusinessUpdatedEvent.cs | 0 .../Subjects/Associate/Gender.cs | 0 .../Subjects/Associate/Government.cs | 0 .../Subjects/Associate/IAssociate.cs | 0 .../Subjects/Associate/IAssociateDetail.cs | 0 .../Subjects/Associate/IAssociateOption.cs | 0 .../Subjects/Associate/IBusinessEntity.cs | 0 .../Subjects/Associate/IBusinessObject.cs | 0 .../Subjects/Associate/IGender.cs | 0 .../Subjects/Associate/IGovernment.cs | 0 .../Subjects/Associate/IPerson.cs | 0 .../Subjects/Associate/IPersonEntity.cs | 0 .../Subjects/Associate/Person.cs | 0 .../Subjects/Detail/AssociateDetail.cs | 0 .../Subjects/Detail/Detail.cs | 0 .../Subjects/Detail/DetailType.cs | 0 .../Subjects/Detail/IDetail.cs | 0 .../Subjects/Detail/IDetailType.cs | 0 .../Subjects/Item/IItem.cs | 0 .../Subjects/Item/IItemGroup.cs | 0 .../Subjects/Item/IItemType.cs | 0 .../Subjects/Item/Item.cs | 0 .../Subjects/Item/ItemGroup.cs | 0 .../Subjects/Item/ItemType.cs | 0 .../Subjects/Option/AssociateOption.cs | 0 .../Subjects/Option/IOption.cs | 0 .../Subjects/Option/IOptionGroup.cs | 0 .../Subjects/Option/Option.cs | 0 .../Subjects/Option/OptionGroup.cs | 0 .../Subjects/Resource/IResource.cs | 0 .../Subjects/Resource/IResourceItem.cs | 0 .../Subjects/Resource/IResourcePerson.cs | 0 .../Subjects/Resource/IResourceType.cs | 0 .../Subjects/Resource/Resource.cs | 0 .../Subjects/Resource/ResourceItem.cs | 0 .../Subjects/Resource/ResourcePerson.cs | 0 .../Subjects/Resource/ResourceType.cs | 0 .../Subjects/Venture/IVenture.cs | 0 .../Venture/IVentureAssociateOption.cs | 0 .../Subjects/Venture/IVentureDetail.cs | 0 .../Subjects/Venture/IVentureOption.cs | 0 .../Subjects/Venture/IVentureResource.cs | 0 .../Subjects/Venture/Venture.cs | 0 .../Venture/VentureAssociateOption.cs | 0 .../Subjects/Venture/VentureDetail.cs | 0 .../Subjects/Venture/VentureOption.cs | 0 .../Subjects/Venture/VentureResource.cs | 0 .../{Core/Domain => Core.Domain}/favicon.ico | Bin .../Domain => Core.Domain}/storeicon.png | Bin src/Subjects/Goodtocode.Subjects.sln | 102 ++++++++---------- .../Configurations/AssociateConfig.cs | 0 .../Configurations/AssociateDetailConfig.cs | 0 .../Configurations/AssociateOptionConfig.cs | 0 .../Configurations/BusinessConfig.cs | 0 .../Configurations/DetailConfig.cs | 0 .../Configurations/DetailTypeConfig.cs | 0 .../Configurations/GenderConfig.cs | 0 .../Configurations/GovernmentConfig.cs | 0 .../Configurations/ItemConfig.cs | 0 .../Configurations/ItemGroupConfig.cs | 0 .../Configurations/ItemTypeConfig.cs | 0 .../Configurations/OptionConfig.cs | 0 .../Configurations/OptionGroupConfig.cs | 0 .../Configurations/PersonConfig.cs | 0 .../Configurations/ResourceConfig.cs | 0 .../Configurations/ResourceItemConfig.cs | 0 .../Configurations/ResourcePersonConfig.cs | 0 .../Configurations/ResourceTypeConfig.cs | 0 .../VentureAssociateOptionConfig.cs | 0 .../Configurations/VentureConfig.cs | 0 .../Configurations/VentureDetailConfig.cs | 0 .../Configurations/VentureOptionConfig.cs | 0 .../Configurations/VentureResourceConfig.cs | 0 .../ConfigureServices.cs | 0 .../Contexts/SubjectsDbContext.cs | 0 .../Infrastructure.Persistence.csproj} | 3 +- .../Repositories/BusinessRepo.cs | 0 .../Repositories/PersonRepo.cs | 0 .../favicon.ico | Bin .../storeicon.png | Bin .../Common/ApiExceptionFilterAttribute.cs | 0 .../Common/BaseController.cs | 0 .../Common/ConfigureSwaggerOptions.cs | 0 .../Controllers/BusinessController.cs | 0 .../Controllers/BusinessesController.cs | 0 .../Goodtocode.Subjects.WebApi.xml | 0 .../Presentation.Api.WebApi.csproj} | 2 +- .../Program.cs | 0 .../local/appInsights1.arm.json | 0 .../Properties/serviceDependencies.json | 0 .../Properties/serviceDependencies.local.json | 0 .../appsettings.Development.json | 0 .../appsettings.Production.json | 0 .../appsettings.json | 0 .../.config/dotnet-tools.json | 0 .../App.razor | 0 .../Data/BusinessService.cs | 0 .../Data/WeatherForecast.cs | 0 .../Data/WeatherForecastService.cs | 0 .../Pages/Business/BusinessCreate.razor | 0 .../Pages/Business/BusinessList.razor | 0 .../Pages/Error.cshtml | 0 .../Pages/Error.cshtml.cs | 0 .../Pages/Index.razor | 0 .../Pages/To-Delete/Counter.razor | 0 .../Pages/To-Delete/FetchData.razor | 0 .../Pages/_Host.cshtml | 0 .../Presentation.Web.BlazorServer.csproj} | 4 +- .../Program.cs | 0 .../Properties/serviceDependencies.json | 0 .../Properties/serviceDependencies.local.json | 0 .../Shared/LoginDisplay.razor | 0 .../Shared/MainLayout.razor | 0 .../Shared/MainLayout.razor.css | 0 .../Shared/NavMenu.razor | 0 .../Shared/NavMenu.razor.css | 0 .../Shared/SurveyPrompt.razor | 0 .../_Imports.razor | 0 .../appsettings.Development.json | 0 .../appsettings.json | 0 .../wwwroot/css/bootstrap/bootstrap.min.css | 0 .../css/bootstrap/bootstrap.min.css.map | 0 .../wwwroot/css/open-iconic/FONT-LICENSE | 0 .../wwwroot/css/open-iconic/ICON-LICENSE | 0 .../wwwroot/css/open-iconic/README.md | 0 .../font/css/open-iconic-bootstrap.min.css | 0 .../open-iconic/font/fonts/open-iconic.eot | Bin .../open-iconic/font/fonts/open-iconic.otf | Bin .../open-iconic/font/fonts/open-iconic.svg | 0 .../open-iconic/font/fonts/open-iconic.ttf | Bin .../open-iconic/font/fonts/open-iconic.woff | Bin .../wwwroot/css/site.css | 0 .../wwwroot/favicon.png | Bin .../.config/dotnet-tools.json | 0 .../App.razor | 0 .../Pages/Authentication.razor | 0 .../Pages/Counter.razor | 0 .../Pages/FetchData.razor | 0 .../Pages/Index.razor | 0 .../Presentation.Web.BlazorStatic.csproj} | 0 .../Program.cs | 0 .../Properties/serviceDependencies.json | 0 .../Properties/serviceDependencies.local.json | 0 .../Shared/LoginDisplay.razor | 0 .../Shared/MainLayout.razor | 0 .../Shared/MainLayout.razor.css | 0 .../Shared/NavMenu.razor | 0 .../Shared/NavMenu.razor.css | 0 .../Shared/RedirectToLogin.razor | 0 .../Shared/SurveyPrompt.razor | 0 .../_Imports.razor | 0 .../wwwroot/appsettings.json | 0 .../wwwroot/css/app.css | 0 .../wwwroot/css/bootstrap/bootstrap.min.css | 0 .../css/bootstrap/bootstrap.min.css.map | 0 .../wwwroot/css/open-iconic/FONT-LICENSE | 0 .../wwwroot/css/open-iconic/ICON-LICENSE | 0 .../wwwroot/css/open-iconic/README.md | 0 .../font/css/open-iconic-bootstrap.min.css | 0 .../open-iconic/font/fonts/open-iconic.eot | Bin .../open-iconic/font/fonts/open-iconic.otf | Bin .../open-iconic/font/fonts/open-iconic.svg | 0 .../open-iconic/font/fonts/open-iconic.ttf | Bin .../open-iconic/font/fonts/open-iconic.woff | Bin .../wwwroot/favicon.png | Bin .../wwwroot/icon-192.png | Bin .../wwwroot/icon-512.png | Bin .../wwwroot/index.html | 0 .../wwwroot/manifest.json | 0 .../wwwroot/sample-data/weather.json | 0 .../wwwroot/service-worker.js | 0 .../wwwroot/service-worker.published.js | 0 .../Commands/DeleteBusinessCommand.feature | 0 .../Commands/DeleteBusinessCommand.feature.cs | 0 .../DeleteBusinessCommandStepDefinitions.cs | 0 .../Commands/UpdateBusinessCommand.feature | 0 .../Commands/UpdateBusinessCommand.feature.cs | 0 .../UpdateBusinessCommandStepDefinitions.cs | 0 .../Queries/GetBusinessesByKey.feature | 0 .../Queries/GetBusinessesByKey.feature.cs | 0 .../GetBusinessesByKeyStepDefinitions.cs | 0 .../Queries/GetBusinessesByName.feature | 0 .../Queries/GetBusinessesByName.feature.cs | 0 .../GetBusinessesByNameStepDefinitions.cs | 0 .../Common/ContextSeeder.cs | 0 .../Common/IContextSeeder.cs | 0 .../Common/ResponseTypes.cs | 0 .../ImplicitUsings.cs | 0 .../Specs.Integration.csproj} | 2 +- .../TestBase.cs | 0 .../appsettings.test.json | 0 .../Commands/AddBusinessCommand.feature | 0 .../Commands/AddBusinessCommand.feature.cs | 0 .../AddBusinessCommandStepDefinitions.cs | 0 .../Commands/DeleteBusinessCommand.feature | 0 .../Commands/DeleteBusinessCommand.feature.cs | 0 .../DeleteBusinessCommandStepDefinitions.cs | 0 .../Commands/UpdateBusinessCommand.feature | 0 .../Commands/UpdateBusinessCommand.feature.cs | 0 .../UpdateBusinessCommandStepDefinitions.cs | 0 .../Queries/GetBusinessesByKey.feature | 0 .../Queries/GetBusinessesByKey.feature.cs | 0 .../GetBusinessesByKeyStepDefinitions.cs | 0 .../Queries/GetBusinessesByName.feature | 0 .../Queries/GetBusinessesByName.feature.cs | 0 .../GetBusinessesByNameStepDefinitions.cs | 0 .../Common/ResponseTypes.cs | 0 .../ImplicitUsings.cs | 0 .../Specs.Unit.csproj} | 2 +- .../TestBase.cs | 0 .../Application.Unit => Specs.Unit}/Usings.cs | 0 .../appsettings.test.json | 0 .../favicon.ico | Bin .../storeicon.png | Bin 249 files changed, 51 insertions(+), 68 deletions(-) rename src/Subjects/{Core/Application => Core.Application}/Business/Commands/AddBusinessCommand.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Business/Commands/AddBusinessCommandValidator.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Business/Commands/DeleteBusinessCommand.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Business/Commands/DeleteBusinessCommandValidator.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Business/Commands/UpdateBusinessCommand.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Business/Commands/UpdateBusinessCommandValidator.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Business/Queries/GetBusinessQuery.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Business/Queries/GetBusinessQueryValidator.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Business/Queries/GetBusinessesByNameQuery.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Business/Queries/GetBusinessesByNameQueryValidator.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Behaviours/LoggingBehaviour.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Behaviours/PerformanceBehaviour.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Behaviours/UnhandledExceptionBehaviour.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Behaviours/ValidationBehaviour.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Exceptions/ConflictException.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Exceptions/ForbiddenAccessException.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Exceptions/NotFoundException.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Exceptions/ValidationException.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Mappings/IMapFrom.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Common/Mappings/MappingProfile.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/ConfigureServices.cs (100%) rename src/Subjects/{Core/Application/Application.csproj => Core.Application/Core.Application.csproj} (91%) rename src/Subjects/{Core/Application => Core.Application}/Interfaces/IBusinessRepo.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Interfaces/IPersonRepo.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Interfaces/ISubjectsDbContext.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Person/UpdatePersonCommand.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/Person/UpdatePersonCommandValidator.cs (100%) rename src/Subjects/{Core/Application => Core.Application}/favicon.ico (100%) rename src/Subjects/{Core/Application => Core.Application}/storeicon.png (100%) rename src/Subjects/{Core/Domain/Domain.csproj => Core.Domain/Core.Domain.csproj} (88%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/Associate.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/BusinessCreatedEvent.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/BusinessDeletedEvent.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/BusinessEntity.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/BusinessObject.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/BusinessUpdatedEvent.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/Gender.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/Government.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/IAssociate.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/IAssociateDetail.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/IAssociateOption.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/IBusinessEntity.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/IBusinessObject.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/IGender.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/IGovernment.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/IPerson.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/IPersonEntity.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Associate/Person.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Detail/AssociateDetail.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Detail/Detail.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Detail/DetailType.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Detail/IDetail.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Detail/IDetailType.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Item/IItem.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Item/IItemGroup.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Item/IItemType.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Item/Item.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Item/ItemGroup.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Item/ItemType.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Option/AssociateOption.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Option/IOption.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Option/IOptionGroup.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Option/Option.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Option/OptionGroup.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Resource/IResource.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Resource/IResourceItem.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Resource/IResourcePerson.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Resource/IResourceType.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Resource/Resource.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Resource/ResourceItem.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Resource/ResourcePerson.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Resource/ResourceType.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/IVenture.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/IVentureAssociateOption.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/IVentureDetail.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/IVentureOption.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/IVentureResource.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/Venture.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/VentureAssociateOption.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/VentureDetail.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/VentureOption.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/Subjects/Venture/VentureResource.cs (100%) rename src/Subjects/{Core/Domain => Core.Domain}/favicon.ico (100%) rename src/Subjects/{Core/Domain => Core.Domain}/storeicon.png (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/AssociateConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/AssociateDetailConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/AssociateOptionConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/BusinessConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/DetailConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/DetailTypeConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/GenderConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/GovernmentConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/ItemConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/ItemGroupConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/ItemTypeConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/OptionConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/OptionGroupConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/PersonConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/ResourceConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/ResourceItemConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/ResourcePersonConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/ResourceTypeConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/VentureAssociateOptionConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/VentureConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/VentureDetailConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/VentureOptionConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Configurations/VentureResourceConfig.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/ConfigureServices.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Contexts/SubjectsDbContext.cs (100%) rename src/Subjects/{Infrastructure/Persistence/Persistence.csproj => Infrastructure.Persistence/Infrastructure.Persistence.csproj} (91%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Repositories/BusinessRepo.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/Repositories/PersonRepo.cs (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/favicon.ico (100%) rename src/Subjects/{Infrastructure/Persistence => Infrastructure.Persistence}/storeicon.png (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Common/ApiExceptionFilterAttribute.cs (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Common/BaseController.cs (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Common/ConfigureSwaggerOptions.cs (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Controllers/BusinessController.cs (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Controllers/BusinessesController.cs (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Goodtocode.Subjects.WebApi.xml (100%) rename src/Subjects/{Presentation/Api.WebApi/Api.WebApi.csproj => Presentation.Api.WebApi/Presentation.Api.WebApi.csproj} (95%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Program.cs (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Properties/ServiceDependencies/local/appInsights1.arm.json (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Properties/serviceDependencies.json (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/Properties/serviceDependencies.local.json (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/appsettings.Development.json (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/appsettings.Production.json (100%) rename src/Subjects/{Presentation/Api.WebApi => Presentation.Api.WebApi}/appsettings.json (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/.config/dotnet-tools.json (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/App.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Data/BusinessService.cs (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Data/WeatherForecast.cs (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Data/WeatherForecastService.cs (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Pages/Business/BusinessCreate.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Pages/Business/BusinessList.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Pages/Error.cshtml (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Pages/Error.cshtml.cs (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Pages/Index.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Pages/To-Delete/Counter.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Pages/To-Delete/FetchData.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Pages/_Host.cshtml (100%) rename src/Subjects/{Presentation/Web.BlazorServer/Web.BlazorServer.csproj => Presentation.Web.BlazorServer/Presentation.Web.BlazorServer.csproj} (87%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Program.cs (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Properties/serviceDependencies.json (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Properties/serviceDependencies.local.json (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Shared/LoginDisplay.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Shared/MainLayout.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Shared/MainLayout.razor.css (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Shared/NavMenu.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Shared/NavMenu.razor.css (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/Shared/SurveyPrompt.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/_Imports.razor (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/appsettings.Development.json (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/appsettings.json (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/bootstrap/bootstrap.min.css (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/bootstrap/bootstrap.min.css.map (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/open-iconic/FONT-LICENSE (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/open-iconic/ICON-LICENSE (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/open-iconic/README.md (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/open-iconic/font/fonts/open-iconic.eot (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/open-iconic/font/fonts/open-iconic.otf (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/open-iconic/font/fonts/open-iconic.svg (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/open-iconic/font/fonts/open-iconic.woff (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/css/site.css (100%) rename src/Subjects/{Presentation/Web.BlazorServer => Presentation.Web.BlazorServer}/wwwroot/favicon.png (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/.config/dotnet-tools.json (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/App.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Pages/Authentication.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Pages/Counter.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Pages/FetchData.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Pages/Index.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic/Web.BlazorStatic.csproj => Presentation.Web.BlazorStatic/Presentation.Web.BlazorStatic.csproj} (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Program.cs (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Properties/serviceDependencies.json (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Properties/serviceDependencies.local.json (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Shared/LoginDisplay.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Shared/MainLayout.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Shared/MainLayout.razor.css (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Shared/NavMenu.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Shared/NavMenu.razor.css (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Shared/RedirectToLogin.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/Shared/SurveyPrompt.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/_Imports.razor (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/appsettings.json (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/app.css (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/bootstrap/bootstrap.min.css (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/bootstrap/bootstrap.min.css.map (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/open-iconic/FONT-LICENSE (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/open-iconic/ICON-LICENSE (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/open-iconic/README.md (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/open-iconic/font/fonts/open-iconic.eot (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/open-iconic/font/fonts/open-iconic.otf (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/open-iconic/font/fonts/open-iconic.svg (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/css/open-iconic/font/fonts/open-iconic.woff (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/favicon.png (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/icon-192.png (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/icon-512.png (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/index.html (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/manifest.json (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/sample-data/weather.json (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/service-worker.js (100%) rename src/Subjects/{Presentation/Web.BlazorStatic => Presentation.Web.BlazorStatic}/wwwroot/service-worker.published.js (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Commands/DeleteBusinessCommand.feature (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Commands/DeleteBusinessCommand.feature.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Commands/DeleteBusinessCommandStepDefinitions.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Commands/UpdateBusinessCommand.feature (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Commands/UpdateBusinessCommand.feature.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Commands/UpdateBusinessCommandStepDefinitions.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Queries/GetBusinessesByKey.feature (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Queries/GetBusinessesByKey.feature.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Queries/GetBusinessesByKeyStepDefinitions.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Queries/GetBusinessesByName.feature (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Queries/GetBusinessesByName.feature.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Business/Queries/GetBusinessesByNameStepDefinitions.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Common/ContextSeeder.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Common/IContextSeeder.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/Common/ResponseTypes.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/ImplicitUsings.cs (100%) rename src/Subjects/{Specs/Application.Integration/Application.Integration.csproj => Specs.Integration/Specs.Integration.csproj} (97%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/TestBase.cs (100%) rename src/Subjects/{Specs/Application.Integration => Specs.Integration}/appsettings.test.json (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Commands/AddBusinessCommand.feature (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Commands/AddBusinessCommand.feature.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Commands/AddBusinessCommandStepDefinitions.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Commands/DeleteBusinessCommand.feature (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Commands/DeleteBusinessCommand.feature.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Commands/DeleteBusinessCommandStepDefinitions.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Commands/UpdateBusinessCommand.feature (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Commands/UpdateBusinessCommand.feature.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Commands/UpdateBusinessCommandStepDefinitions.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Queries/GetBusinessesByKey.feature (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Queries/GetBusinessesByKey.feature.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Queries/GetBusinessesByKeyStepDefinitions.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Queries/GetBusinessesByName.feature (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Queries/GetBusinessesByName.feature.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Business/Queries/GetBusinessesByNameStepDefinitions.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Common/ResponseTypes.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/ImplicitUsings.cs (100%) rename src/Subjects/{Specs/Application.Unit/Application.Unit.csproj => Specs.Unit/Specs.Unit.csproj} (97%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/TestBase.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/Usings.cs (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/appsettings.test.json (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/favicon.ico (100%) rename src/Subjects/{Specs/Application.Unit => Specs.Unit}/storeicon.png (100%) diff --git a/src/Subjects/Core/Application/Business/Commands/AddBusinessCommand.cs b/src/Subjects/Core.Application/Business/Commands/AddBusinessCommand.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Commands/AddBusinessCommand.cs rename to src/Subjects/Core.Application/Business/Commands/AddBusinessCommand.cs diff --git a/src/Subjects/Core/Application/Business/Commands/AddBusinessCommandValidator.cs b/src/Subjects/Core.Application/Business/Commands/AddBusinessCommandValidator.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Commands/AddBusinessCommandValidator.cs rename to src/Subjects/Core.Application/Business/Commands/AddBusinessCommandValidator.cs diff --git a/src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommand.cs b/src/Subjects/Core.Application/Business/Commands/DeleteBusinessCommand.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommand.cs rename to src/Subjects/Core.Application/Business/Commands/DeleteBusinessCommand.cs diff --git a/src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommandValidator.cs b/src/Subjects/Core.Application/Business/Commands/DeleteBusinessCommandValidator.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Commands/DeleteBusinessCommandValidator.cs rename to src/Subjects/Core.Application/Business/Commands/DeleteBusinessCommandValidator.cs diff --git a/src/Subjects/Core/Application/Business/Commands/UpdateBusinessCommand.cs b/src/Subjects/Core.Application/Business/Commands/UpdateBusinessCommand.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Commands/UpdateBusinessCommand.cs rename to src/Subjects/Core.Application/Business/Commands/UpdateBusinessCommand.cs diff --git a/src/Subjects/Core/Application/Business/Commands/UpdateBusinessCommandValidator.cs b/src/Subjects/Core.Application/Business/Commands/UpdateBusinessCommandValidator.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Commands/UpdateBusinessCommandValidator.cs rename to src/Subjects/Core.Application/Business/Commands/UpdateBusinessCommandValidator.cs diff --git a/src/Subjects/Core/Application/Business/Queries/GetBusinessQuery.cs b/src/Subjects/Core.Application/Business/Queries/GetBusinessQuery.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Queries/GetBusinessQuery.cs rename to src/Subjects/Core.Application/Business/Queries/GetBusinessQuery.cs diff --git a/src/Subjects/Core/Application/Business/Queries/GetBusinessQueryValidator.cs b/src/Subjects/Core.Application/Business/Queries/GetBusinessQueryValidator.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Queries/GetBusinessQueryValidator.cs rename to src/Subjects/Core.Application/Business/Queries/GetBusinessQueryValidator.cs diff --git a/src/Subjects/Core/Application/Business/Queries/GetBusinessesByNameQuery.cs b/src/Subjects/Core.Application/Business/Queries/GetBusinessesByNameQuery.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Queries/GetBusinessesByNameQuery.cs rename to src/Subjects/Core.Application/Business/Queries/GetBusinessesByNameQuery.cs diff --git a/src/Subjects/Core/Application/Business/Queries/GetBusinessesByNameQueryValidator.cs b/src/Subjects/Core.Application/Business/Queries/GetBusinessesByNameQueryValidator.cs similarity index 100% rename from src/Subjects/Core/Application/Business/Queries/GetBusinessesByNameQueryValidator.cs rename to src/Subjects/Core.Application/Business/Queries/GetBusinessesByNameQueryValidator.cs diff --git a/src/Subjects/Core/Application/Common/Behaviours/LoggingBehaviour.cs b/src/Subjects/Core.Application/Common/Behaviours/LoggingBehaviour.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Behaviours/LoggingBehaviour.cs rename to src/Subjects/Core.Application/Common/Behaviours/LoggingBehaviour.cs diff --git a/src/Subjects/Core/Application/Common/Behaviours/PerformanceBehaviour.cs b/src/Subjects/Core.Application/Common/Behaviours/PerformanceBehaviour.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Behaviours/PerformanceBehaviour.cs rename to src/Subjects/Core.Application/Common/Behaviours/PerformanceBehaviour.cs diff --git a/src/Subjects/Core/Application/Common/Behaviours/UnhandledExceptionBehaviour.cs b/src/Subjects/Core.Application/Common/Behaviours/UnhandledExceptionBehaviour.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Behaviours/UnhandledExceptionBehaviour.cs rename to src/Subjects/Core.Application/Common/Behaviours/UnhandledExceptionBehaviour.cs diff --git a/src/Subjects/Core/Application/Common/Behaviours/ValidationBehaviour.cs b/src/Subjects/Core.Application/Common/Behaviours/ValidationBehaviour.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Behaviours/ValidationBehaviour.cs rename to src/Subjects/Core.Application/Common/Behaviours/ValidationBehaviour.cs diff --git a/src/Subjects/Core/Application/Common/Exceptions/ConflictException.cs b/src/Subjects/Core.Application/Common/Exceptions/ConflictException.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Exceptions/ConflictException.cs rename to src/Subjects/Core.Application/Common/Exceptions/ConflictException.cs diff --git a/src/Subjects/Core/Application/Common/Exceptions/ForbiddenAccessException.cs b/src/Subjects/Core.Application/Common/Exceptions/ForbiddenAccessException.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Exceptions/ForbiddenAccessException.cs rename to src/Subjects/Core.Application/Common/Exceptions/ForbiddenAccessException.cs diff --git a/src/Subjects/Core/Application/Common/Exceptions/NotFoundException.cs b/src/Subjects/Core.Application/Common/Exceptions/NotFoundException.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Exceptions/NotFoundException.cs rename to src/Subjects/Core.Application/Common/Exceptions/NotFoundException.cs diff --git a/src/Subjects/Core/Application/Common/Exceptions/ValidationException.cs b/src/Subjects/Core.Application/Common/Exceptions/ValidationException.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Exceptions/ValidationException.cs rename to src/Subjects/Core.Application/Common/Exceptions/ValidationException.cs diff --git a/src/Subjects/Core/Application/Common/Mappings/IMapFrom.cs b/src/Subjects/Core.Application/Common/Mappings/IMapFrom.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Mappings/IMapFrom.cs rename to src/Subjects/Core.Application/Common/Mappings/IMapFrom.cs diff --git a/src/Subjects/Core/Application/Common/Mappings/MappingProfile.cs b/src/Subjects/Core.Application/Common/Mappings/MappingProfile.cs similarity index 100% rename from src/Subjects/Core/Application/Common/Mappings/MappingProfile.cs rename to src/Subjects/Core.Application/Common/Mappings/MappingProfile.cs diff --git a/src/Subjects/Core/Application/ConfigureServices.cs b/src/Subjects/Core.Application/ConfigureServices.cs similarity index 100% rename from src/Subjects/Core/Application/ConfigureServices.cs rename to src/Subjects/Core.Application/ConfigureServices.cs diff --git a/src/Subjects/Core/Application/Application.csproj b/src/Subjects/Core.Application/Core.Application.csproj similarity index 91% rename from src/Subjects/Core/Application/Application.csproj rename to src/Subjects/Core.Application/Core.Application.csproj index 1232c9e0..92c7380e 100644 --- a/src/Subjects/Core/Application/Application.csproj +++ b/src/Subjects/Core.Application/Core.Application.csproj @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs b/src/Subjects/Core.Application/Interfaces/IBusinessRepo.cs similarity index 100% rename from src/Subjects/Core/Application/Interfaces/IBusinessRepo.cs rename to src/Subjects/Core.Application/Interfaces/IBusinessRepo.cs diff --git a/src/Subjects/Core/Application/Interfaces/IPersonRepo.cs b/src/Subjects/Core.Application/Interfaces/IPersonRepo.cs similarity index 100% rename from src/Subjects/Core/Application/Interfaces/IPersonRepo.cs rename to src/Subjects/Core.Application/Interfaces/IPersonRepo.cs diff --git a/src/Subjects/Core/Application/Interfaces/ISubjectsDbContext.cs b/src/Subjects/Core.Application/Interfaces/ISubjectsDbContext.cs similarity index 100% rename from src/Subjects/Core/Application/Interfaces/ISubjectsDbContext.cs rename to src/Subjects/Core.Application/Interfaces/ISubjectsDbContext.cs diff --git a/src/Subjects/Core/Application/Person/UpdatePersonCommand.cs b/src/Subjects/Core.Application/Person/UpdatePersonCommand.cs similarity index 100% rename from src/Subjects/Core/Application/Person/UpdatePersonCommand.cs rename to src/Subjects/Core.Application/Person/UpdatePersonCommand.cs diff --git a/src/Subjects/Core/Application/Person/UpdatePersonCommandValidator.cs b/src/Subjects/Core.Application/Person/UpdatePersonCommandValidator.cs similarity index 100% rename from src/Subjects/Core/Application/Person/UpdatePersonCommandValidator.cs rename to src/Subjects/Core.Application/Person/UpdatePersonCommandValidator.cs diff --git a/src/Subjects/Core/Application/favicon.ico b/src/Subjects/Core.Application/favicon.ico similarity index 100% rename from src/Subjects/Core/Application/favicon.ico rename to src/Subjects/Core.Application/favicon.ico diff --git a/src/Subjects/Core/Application/storeicon.png b/src/Subjects/Core.Application/storeicon.png similarity index 100% rename from src/Subjects/Core/Application/storeicon.png rename to src/Subjects/Core.Application/storeicon.png diff --git a/src/Subjects/Core/Domain/Domain.csproj b/src/Subjects/Core.Domain/Core.Domain.csproj similarity index 88% rename from src/Subjects/Core/Domain/Domain.csproj rename to src/Subjects/Core.Domain/Core.Domain.csproj index 42fb59aa..a7ab76b5 100644 --- a/src/Subjects/Core/Domain/Domain.csproj +++ b/src/Subjects/Core.Domain/Core.Domain.csproj @@ -14,6 +14,6 @@ - + \ No newline at end of file diff --git a/src/Subjects/Core/Domain/Subjects/Associate/Associate.cs b/src/Subjects/Core.Domain/Subjects/Associate/Associate.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/Associate.cs rename to src/Subjects/Core.Domain/Subjects/Associate/Associate.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/BusinessCreatedEvent.cs b/src/Subjects/Core.Domain/Subjects/Associate/BusinessCreatedEvent.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/BusinessCreatedEvent.cs rename to src/Subjects/Core.Domain/Subjects/Associate/BusinessCreatedEvent.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/BusinessDeletedEvent.cs b/src/Subjects/Core.Domain/Subjects/Associate/BusinessDeletedEvent.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/BusinessDeletedEvent.cs rename to src/Subjects/Core.Domain/Subjects/Associate/BusinessDeletedEvent.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/BusinessEntity.cs b/src/Subjects/Core.Domain/Subjects/Associate/BusinessEntity.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/BusinessEntity.cs rename to src/Subjects/Core.Domain/Subjects/Associate/BusinessEntity.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/BusinessObject.cs b/src/Subjects/Core.Domain/Subjects/Associate/BusinessObject.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/BusinessObject.cs rename to src/Subjects/Core.Domain/Subjects/Associate/BusinessObject.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/BusinessUpdatedEvent.cs b/src/Subjects/Core.Domain/Subjects/Associate/BusinessUpdatedEvent.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/BusinessUpdatedEvent.cs rename to src/Subjects/Core.Domain/Subjects/Associate/BusinessUpdatedEvent.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/Gender.cs b/src/Subjects/Core.Domain/Subjects/Associate/Gender.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/Gender.cs rename to src/Subjects/Core.Domain/Subjects/Associate/Gender.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/Government.cs b/src/Subjects/Core.Domain/Subjects/Associate/Government.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/Government.cs rename to src/Subjects/Core.Domain/Subjects/Associate/Government.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/IAssociate.cs b/src/Subjects/Core.Domain/Subjects/Associate/IAssociate.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/IAssociate.cs rename to src/Subjects/Core.Domain/Subjects/Associate/IAssociate.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/IAssociateDetail.cs b/src/Subjects/Core.Domain/Subjects/Associate/IAssociateDetail.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/IAssociateDetail.cs rename to src/Subjects/Core.Domain/Subjects/Associate/IAssociateDetail.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/IAssociateOption.cs b/src/Subjects/Core.Domain/Subjects/Associate/IAssociateOption.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/IAssociateOption.cs rename to src/Subjects/Core.Domain/Subjects/Associate/IAssociateOption.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/IBusinessEntity.cs b/src/Subjects/Core.Domain/Subjects/Associate/IBusinessEntity.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/IBusinessEntity.cs rename to src/Subjects/Core.Domain/Subjects/Associate/IBusinessEntity.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/IBusinessObject.cs b/src/Subjects/Core.Domain/Subjects/Associate/IBusinessObject.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/IBusinessObject.cs rename to src/Subjects/Core.Domain/Subjects/Associate/IBusinessObject.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/IGender.cs b/src/Subjects/Core.Domain/Subjects/Associate/IGender.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/IGender.cs rename to src/Subjects/Core.Domain/Subjects/Associate/IGender.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/IGovernment.cs b/src/Subjects/Core.Domain/Subjects/Associate/IGovernment.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/IGovernment.cs rename to src/Subjects/Core.Domain/Subjects/Associate/IGovernment.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/IPerson.cs b/src/Subjects/Core.Domain/Subjects/Associate/IPerson.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/IPerson.cs rename to src/Subjects/Core.Domain/Subjects/Associate/IPerson.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/IPersonEntity.cs b/src/Subjects/Core.Domain/Subjects/Associate/IPersonEntity.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/IPersonEntity.cs rename to src/Subjects/Core.Domain/Subjects/Associate/IPersonEntity.cs diff --git a/src/Subjects/Core/Domain/Subjects/Associate/Person.cs b/src/Subjects/Core.Domain/Subjects/Associate/Person.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Associate/Person.cs rename to src/Subjects/Core.Domain/Subjects/Associate/Person.cs diff --git a/src/Subjects/Core/Domain/Subjects/Detail/AssociateDetail.cs b/src/Subjects/Core.Domain/Subjects/Detail/AssociateDetail.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Detail/AssociateDetail.cs rename to src/Subjects/Core.Domain/Subjects/Detail/AssociateDetail.cs diff --git a/src/Subjects/Core/Domain/Subjects/Detail/Detail.cs b/src/Subjects/Core.Domain/Subjects/Detail/Detail.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Detail/Detail.cs rename to src/Subjects/Core.Domain/Subjects/Detail/Detail.cs diff --git a/src/Subjects/Core/Domain/Subjects/Detail/DetailType.cs b/src/Subjects/Core.Domain/Subjects/Detail/DetailType.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Detail/DetailType.cs rename to src/Subjects/Core.Domain/Subjects/Detail/DetailType.cs diff --git a/src/Subjects/Core/Domain/Subjects/Detail/IDetail.cs b/src/Subjects/Core.Domain/Subjects/Detail/IDetail.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Detail/IDetail.cs rename to src/Subjects/Core.Domain/Subjects/Detail/IDetail.cs diff --git a/src/Subjects/Core/Domain/Subjects/Detail/IDetailType.cs b/src/Subjects/Core.Domain/Subjects/Detail/IDetailType.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Detail/IDetailType.cs rename to src/Subjects/Core.Domain/Subjects/Detail/IDetailType.cs diff --git a/src/Subjects/Core/Domain/Subjects/Item/IItem.cs b/src/Subjects/Core.Domain/Subjects/Item/IItem.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Item/IItem.cs rename to src/Subjects/Core.Domain/Subjects/Item/IItem.cs diff --git a/src/Subjects/Core/Domain/Subjects/Item/IItemGroup.cs b/src/Subjects/Core.Domain/Subjects/Item/IItemGroup.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Item/IItemGroup.cs rename to src/Subjects/Core.Domain/Subjects/Item/IItemGroup.cs diff --git a/src/Subjects/Core/Domain/Subjects/Item/IItemType.cs b/src/Subjects/Core.Domain/Subjects/Item/IItemType.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Item/IItemType.cs rename to src/Subjects/Core.Domain/Subjects/Item/IItemType.cs diff --git a/src/Subjects/Core/Domain/Subjects/Item/Item.cs b/src/Subjects/Core.Domain/Subjects/Item/Item.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Item/Item.cs rename to src/Subjects/Core.Domain/Subjects/Item/Item.cs diff --git a/src/Subjects/Core/Domain/Subjects/Item/ItemGroup.cs b/src/Subjects/Core.Domain/Subjects/Item/ItemGroup.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Item/ItemGroup.cs rename to src/Subjects/Core.Domain/Subjects/Item/ItemGroup.cs diff --git a/src/Subjects/Core/Domain/Subjects/Item/ItemType.cs b/src/Subjects/Core.Domain/Subjects/Item/ItemType.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Item/ItemType.cs rename to src/Subjects/Core.Domain/Subjects/Item/ItemType.cs diff --git a/src/Subjects/Core/Domain/Subjects/Option/AssociateOption.cs b/src/Subjects/Core.Domain/Subjects/Option/AssociateOption.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Option/AssociateOption.cs rename to src/Subjects/Core.Domain/Subjects/Option/AssociateOption.cs diff --git a/src/Subjects/Core/Domain/Subjects/Option/IOption.cs b/src/Subjects/Core.Domain/Subjects/Option/IOption.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Option/IOption.cs rename to src/Subjects/Core.Domain/Subjects/Option/IOption.cs diff --git a/src/Subjects/Core/Domain/Subjects/Option/IOptionGroup.cs b/src/Subjects/Core.Domain/Subjects/Option/IOptionGroup.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Option/IOptionGroup.cs rename to src/Subjects/Core.Domain/Subjects/Option/IOptionGroup.cs diff --git a/src/Subjects/Core/Domain/Subjects/Option/Option.cs b/src/Subjects/Core.Domain/Subjects/Option/Option.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Option/Option.cs rename to src/Subjects/Core.Domain/Subjects/Option/Option.cs diff --git a/src/Subjects/Core/Domain/Subjects/Option/OptionGroup.cs b/src/Subjects/Core.Domain/Subjects/Option/OptionGroup.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Option/OptionGroup.cs rename to src/Subjects/Core.Domain/Subjects/Option/OptionGroup.cs diff --git a/src/Subjects/Core/Domain/Subjects/Resource/IResource.cs b/src/Subjects/Core.Domain/Subjects/Resource/IResource.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Resource/IResource.cs rename to src/Subjects/Core.Domain/Subjects/Resource/IResource.cs diff --git a/src/Subjects/Core/Domain/Subjects/Resource/IResourceItem.cs b/src/Subjects/Core.Domain/Subjects/Resource/IResourceItem.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Resource/IResourceItem.cs rename to src/Subjects/Core.Domain/Subjects/Resource/IResourceItem.cs diff --git a/src/Subjects/Core/Domain/Subjects/Resource/IResourcePerson.cs b/src/Subjects/Core.Domain/Subjects/Resource/IResourcePerson.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Resource/IResourcePerson.cs rename to src/Subjects/Core.Domain/Subjects/Resource/IResourcePerson.cs diff --git a/src/Subjects/Core/Domain/Subjects/Resource/IResourceType.cs b/src/Subjects/Core.Domain/Subjects/Resource/IResourceType.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Resource/IResourceType.cs rename to src/Subjects/Core.Domain/Subjects/Resource/IResourceType.cs diff --git a/src/Subjects/Core/Domain/Subjects/Resource/Resource.cs b/src/Subjects/Core.Domain/Subjects/Resource/Resource.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Resource/Resource.cs rename to src/Subjects/Core.Domain/Subjects/Resource/Resource.cs diff --git a/src/Subjects/Core/Domain/Subjects/Resource/ResourceItem.cs b/src/Subjects/Core.Domain/Subjects/Resource/ResourceItem.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Resource/ResourceItem.cs rename to src/Subjects/Core.Domain/Subjects/Resource/ResourceItem.cs diff --git a/src/Subjects/Core/Domain/Subjects/Resource/ResourcePerson.cs b/src/Subjects/Core.Domain/Subjects/Resource/ResourcePerson.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Resource/ResourcePerson.cs rename to src/Subjects/Core.Domain/Subjects/Resource/ResourcePerson.cs diff --git a/src/Subjects/Core/Domain/Subjects/Resource/ResourceType.cs b/src/Subjects/Core.Domain/Subjects/Resource/ResourceType.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Resource/ResourceType.cs rename to src/Subjects/Core.Domain/Subjects/Resource/ResourceType.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/IVenture.cs b/src/Subjects/Core.Domain/Subjects/Venture/IVenture.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/IVenture.cs rename to src/Subjects/Core.Domain/Subjects/Venture/IVenture.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/IVentureAssociateOption.cs b/src/Subjects/Core.Domain/Subjects/Venture/IVentureAssociateOption.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/IVentureAssociateOption.cs rename to src/Subjects/Core.Domain/Subjects/Venture/IVentureAssociateOption.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/IVentureDetail.cs b/src/Subjects/Core.Domain/Subjects/Venture/IVentureDetail.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/IVentureDetail.cs rename to src/Subjects/Core.Domain/Subjects/Venture/IVentureDetail.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/IVentureOption.cs b/src/Subjects/Core.Domain/Subjects/Venture/IVentureOption.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/IVentureOption.cs rename to src/Subjects/Core.Domain/Subjects/Venture/IVentureOption.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/IVentureResource.cs b/src/Subjects/Core.Domain/Subjects/Venture/IVentureResource.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/IVentureResource.cs rename to src/Subjects/Core.Domain/Subjects/Venture/IVentureResource.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/Venture.cs b/src/Subjects/Core.Domain/Subjects/Venture/Venture.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/Venture.cs rename to src/Subjects/Core.Domain/Subjects/Venture/Venture.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/VentureAssociateOption.cs b/src/Subjects/Core.Domain/Subjects/Venture/VentureAssociateOption.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/VentureAssociateOption.cs rename to src/Subjects/Core.Domain/Subjects/Venture/VentureAssociateOption.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/VentureDetail.cs b/src/Subjects/Core.Domain/Subjects/Venture/VentureDetail.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/VentureDetail.cs rename to src/Subjects/Core.Domain/Subjects/Venture/VentureDetail.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/VentureOption.cs b/src/Subjects/Core.Domain/Subjects/Venture/VentureOption.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/VentureOption.cs rename to src/Subjects/Core.Domain/Subjects/Venture/VentureOption.cs diff --git a/src/Subjects/Core/Domain/Subjects/Venture/VentureResource.cs b/src/Subjects/Core.Domain/Subjects/Venture/VentureResource.cs similarity index 100% rename from src/Subjects/Core/Domain/Subjects/Venture/VentureResource.cs rename to src/Subjects/Core.Domain/Subjects/Venture/VentureResource.cs diff --git a/src/Subjects/Core/Domain/favicon.ico b/src/Subjects/Core.Domain/favicon.ico similarity index 100% rename from src/Subjects/Core/Domain/favicon.ico rename to src/Subjects/Core.Domain/favicon.ico diff --git a/src/Subjects/Core/Domain/storeicon.png b/src/Subjects/Core.Domain/storeicon.png similarity index 100% rename from src/Subjects/Core/Domain/storeicon.png rename to src/Subjects/Core.Domain/storeicon.png diff --git a/src/Subjects/Goodtocode.Subjects.sln b/src/Subjects/Goodtocode.Subjects.sln index d22bf6f1..4142f06b 100644 --- a/src/Subjects/Goodtocode.Subjects.sln +++ b/src/Subjects/Goodtocode.Subjects.sln @@ -3,37 +3,29 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.33414.496 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{AFB1C448-C01D-419A-94D4-5E43C2DC4FFA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{F7C79A97-5E66-4753-A967-0FEBF5C4F6BD}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Specs", "Specs", "{3FC64677-0627-43FD-B3CB-070425CBBAB2}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Presentation", "Presentation", "{480B6912-14D8-4B43-A6FA-902A1C0631C3}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{5D8887CA-2929-4E91-9409-B3366F968527}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Application", "Core\Application\Application.csproj", "{0D65058A-AE89-41F5-A46C-0A1D43336C57}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Application", "Common\Common.Application\Common.Application.csproj", "{D5BF79A6-68B3-41B0-AB63-28E30DD87018}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Domain", "Core\Domain\Domain.csproj", "{9F755689-238D-4B0F-B980-A73F5E300762}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Domain", "Common\Common.Domain\Common.Domain.csproj", "{DCD762D0-8543-4436-969C-975A94833F20}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Application.Unit", "Specs\Application.Unit\Application.Unit.csproj", "{E2B035C3-46D3-4624-ADE0-4933ED8D2083}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Infrastructure.ApiClient", "Common\Common.Infrastructure.ApiClient\Common.Infrastructure.ApiClient.csproj", "{38DDD951-3F89-41FE-A225-326DA46A39CF}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Persistence", "Infrastructure\Persistence\Persistence.csproj", "{40D2528E-1BB9-4994-ADED-F663E68CB762}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Application", "Core.Application\Core.Application.csproj", "{859E4300-2DB5-431A-9319-5AEA12552D85}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Application.Integration", "Specs\Application.Integration\Application.Integration.csproj", "{AD03FBD9-E114-417F-A013-1B0970E318C4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Domain", "Core.Domain\Core.Domain.csproj", "{45163683-2F3E-400C-A4C3-8730ED889371}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Api.WebApi", "Presentation\Api.WebApi\Api.WebApi.csproj", "{90C40206-51B2-468D-9DDF-ABEDA9910126}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Infrastructure.Persistence", "Infrastructure.Persistence\Infrastructure.Persistence.csproj", "{6A5A99A9-AE09-4310-A332-FCE1D7E3BED8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.BlazorServer", "Presentation\Web.BlazorServer\Web.BlazorServer.csproj", "{54E11167-6104-4007-A7BA-4569F2999F76}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Presentation.Api.WebApi", "Presentation.Api.WebApi\Presentation.Api.WebApi.csproj", "{F77242BC-0FEB-4921-8AA1-4C21ADFD61CC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.BlazorStatic", "Presentation\Web.BlazorStatic\Web.BlazorStatic.csproj", "{2448A3C7-1BC1-4BE9-8608-08152D126704}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Presentation.Web.BlazorServer", "Presentation.Web.BlazorServer\Presentation.Web.BlazorServer.csproj", "{34AE3733-6973-4679-AE56-272A6C0FA17E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Application", "Common\Common.Application\Common.Application.csproj", "{D5BF79A6-68B3-41B0-AB63-28E30DD87018}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Presentation.Web.BlazorStatic", "Presentation.Web.BlazorStatic\Presentation.Web.BlazorStatic.csproj", "{3BCED1B9-9EFA-4835-9D41-28BBD8297075}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Domain", "Common\Common.Domain\Common.Domain.csproj", "{DCD762D0-8543-4436-969C-975A94833F20}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Specs.Integration", "Specs.Integration\Specs.Integration.csproj", "{38803827-63A1-4466-94D4-D52E9EA1DA4A}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Infrastructure.ApiClient", "Common\Common.Infrastructure.ApiClient\Common.Infrastructure.ApiClient.csproj", "{38DDD951-3F89-41FE-A225-326DA46A39CF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Specs.Unit", "Specs.Unit\Specs.Unit.csproj", "{B1912655-E309-4886-A882-1C384ACFB165}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -41,38 +33,6 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0D65058A-AE89-41F5-A46C-0A1D43336C57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0D65058A-AE89-41F5-A46C-0A1D43336C57}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0D65058A-AE89-41F5-A46C-0A1D43336C57}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0D65058A-AE89-41F5-A46C-0A1D43336C57}.Release|Any CPU.Build.0 = Release|Any CPU - {9F755689-238D-4B0F-B980-A73F5E300762}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F755689-238D-4B0F-B980-A73F5E300762}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F755689-238D-4B0F-B980-A73F5E300762}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F755689-238D-4B0F-B980-A73F5E300762}.Release|Any CPU.Build.0 = Release|Any CPU - {E2B035C3-46D3-4624-ADE0-4933ED8D2083}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E2B035C3-46D3-4624-ADE0-4933ED8D2083}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E2B035C3-46D3-4624-ADE0-4933ED8D2083}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E2B035C3-46D3-4624-ADE0-4933ED8D2083}.Release|Any CPU.Build.0 = Release|Any CPU - {40D2528E-1BB9-4994-ADED-F663E68CB762}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {40D2528E-1BB9-4994-ADED-F663E68CB762}.Debug|Any CPU.Build.0 = Debug|Any CPU - {40D2528E-1BB9-4994-ADED-F663E68CB762}.Release|Any CPU.ActiveCfg = Release|Any CPU - {40D2528E-1BB9-4994-ADED-F663E68CB762}.Release|Any CPU.Build.0 = Release|Any CPU - {AD03FBD9-E114-417F-A013-1B0970E318C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AD03FBD9-E114-417F-A013-1B0970E318C4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AD03FBD9-E114-417F-A013-1B0970E318C4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AD03FBD9-E114-417F-A013-1B0970E318C4}.Release|Any CPU.Build.0 = Release|Any CPU - {90C40206-51B2-468D-9DDF-ABEDA9910126}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {90C40206-51B2-468D-9DDF-ABEDA9910126}.Debug|Any CPU.Build.0 = Debug|Any CPU - {90C40206-51B2-468D-9DDF-ABEDA9910126}.Release|Any CPU.ActiveCfg = Release|Any CPU - {90C40206-51B2-468D-9DDF-ABEDA9910126}.Release|Any CPU.Build.0 = Release|Any CPU - {54E11167-6104-4007-A7BA-4569F2999F76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {54E11167-6104-4007-A7BA-4569F2999F76}.Debug|Any CPU.Build.0 = Debug|Any CPU - {54E11167-6104-4007-A7BA-4569F2999F76}.Release|Any CPU.ActiveCfg = Release|Any CPU - {54E11167-6104-4007-A7BA-4569F2999F76}.Release|Any CPU.Build.0 = Release|Any CPU - {2448A3C7-1BC1-4BE9-8608-08152D126704}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2448A3C7-1BC1-4BE9-8608-08152D126704}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2448A3C7-1BC1-4BE9-8608-08152D126704}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2448A3C7-1BC1-4BE9-8608-08152D126704}.Release|Any CPU.Build.0 = Release|Any CPU {D5BF79A6-68B3-41B0-AB63-28E30DD87018}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D5BF79A6-68B3-41B0-AB63-28E30DD87018}.Debug|Any CPU.Build.0 = Debug|Any CPU {D5BF79A6-68B3-41B0-AB63-28E30DD87018}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -85,19 +45,43 @@ Global {38DDD951-3F89-41FE-A225-326DA46A39CF}.Debug|Any CPU.Build.0 = Debug|Any CPU {38DDD951-3F89-41FE-A225-326DA46A39CF}.Release|Any CPU.ActiveCfg = Release|Any CPU {38DDD951-3F89-41FE-A225-326DA46A39CF}.Release|Any CPU.Build.0 = Release|Any CPU + {859E4300-2DB5-431A-9319-5AEA12552D85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {859E4300-2DB5-431A-9319-5AEA12552D85}.Debug|Any CPU.Build.0 = Debug|Any CPU + {859E4300-2DB5-431A-9319-5AEA12552D85}.Release|Any CPU.ActiveCfg = Release|Any CPU + {859E4300-2DB5-431A-9319-5AEA12552D85}.Release|Any CPU.Build.0 = Release|Any CPU + {45163683-2F3E-400C-A4C3-8730ED889371}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45163683-2F3E-400C-A4C3-8730ED889371}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45163683-2F3E-400C-A4C3-8730ED889371}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45163683-2F3E-400C-A4C3-8730ED889371}.Release|Any CPU.Build.0 = Release|Any CPU + {6A5A99A9-AE09-4310-A332-FCE1D7E3BED8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A5A99A9-AE09-4310-A332-FCE1D7E3BED8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A5A99A9-AE09-4310-A332-FCE1D7E3BED8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A5A99A9-AE09-4310-A332-FCE1D7E3BED8}.Release|Any CPU.Build.0 = Release|Any CPU + {F77242BC-0FEB-4921-8AA1-4C21ADFD61CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F77242BC-0FEB-4921-8AA1-4C21ADFD61CC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F77242BC-0FEB-4921-8AA1-4C21ADFD61CC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F77242BC-0FEB-4921-8AA1-4C21ADFD61CC}.Release|Any CPU.Build.0 = Release|Any CPU + {34AE3733-6973-4679-AE56-272A6C0FA17E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34AE3733-6973-4679-AE56-272A6C0FA17E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34AE3733-6973-4679-AE56-272A6C0FA17E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34AE3733-6973-4679-AE56-272A6C0FA17E}.Release|Any CPU.Build.0 = Release|Any CPU + {3BCED1B9-9EFA-4835-9D41-28BBD8297075}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3BCED1B9-9EFA-4835-9D41-28BBD8297075}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3BCED1B9-9EFA-4835-9D41-28BBD8297075}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3BCED1B9-9EFA-4835-9D41-28BBD8297075}.Release|Any CPU.Build.0 = Release|Any CPU + {38803827-63A1-4466-94D4-D52E9EA1DA4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {38803827-63A1-4466-94D4-D52E9EA1DA4A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {38803827-63A1-4466-94D4-D52E9EA1DA4A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {38803827-63A1-4466-94D4-D52E9EA1DA4A}.Release|Any CPU.Build.0 = Release|Any CPU + {B1912655-E309-4886-A882-1C384ACFB165}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B1912655-E309-4886-A882-1C384ACFB165}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B1912655-E309-4886-A882-1C384ACFB165}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B1912655-E309-4886-A882-1C384ACFB165}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {0D65058A-AE89-41F5-A46C-0A1D43336C57} = {AFB1C448-C01D-419A-94D4-5E43C2DC4FFA} - {9F755689-238D-4B0F-B980-A73F5E300762} = {AFB1C448-C01D-419A-94D4-5E43C2DC4FFA} - {E2B035C3-46D3-4624-ADE0-4933ED8D2083} = {3FC64677-0627-43FD-B3CB-070425CBBAB2} - {40D2528E-1BB9-4994-ADED-F663E68CB762} = {F7C79A97-5E66-4753-A967-0FEBF5C4F6BD} - {AD03FBD9-E114-417F-A013-1B0970E318C4} = {3FC64677-0627-43FD-B3CB-070425CBBAB2} - {90C40206-51B2-468D-9DDF-ABEDA9910126} = {480B6912-14D8-4B43-A6FA-902A1C0631C3} - {54E11167-6104-4007-A7BA-4569F2999F76} = {480B6912-14D8-4B43-A6FA-902A1C0631C3} - {2448A3C7-1BC1-4BE9-8608-08152D126704} = {480B6912-14D8-4B43-A6FA-902A1C0631C3} {D5BF79A6-68B3-41B0-AB63-28E30DD87018} = {5D8887CA-2929-4E91-9409-B3366F968527} {DCD762D0-8543-4436-969C-975A94833F20} = {5D8887CA-2929-4E91-9409-B3366F968527} {38DDD951-3F89-41FE-A225-326DA46A39CF} = {5D8887CA-2929-4E91-9409-B3366F968527} diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/AssociateConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/AssociateConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/AssociateConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/AssociateConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/AssociateDetailConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/AssociateDetailConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/AssociateDetailConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/AssociateDetailConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/AssociateOptionConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/AssociateOptionConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/AssociateOptionConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/AssociateOptionConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/BusinessConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/BusinessConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/BusinessConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/BusinessConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/DetailConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/DetailConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/DetailConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/DetailConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/DetailTypeConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/DetailTypeConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/DetailTypeConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/DetailTypeConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/GenderConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/GenderConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/GenderConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/GenderConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/GovernmentConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/GovernmentConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/GovernmentConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/GovernmentConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/ItemConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/ItemConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/ItemConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/ItemConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/ItemGroupConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/ItemGroupConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/ItemGroupConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/ItemGroupConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/ItemTypeConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/ItemTypeConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/ItemTypeConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/ItemTypeConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/OptionConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/OptionConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/OptionConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/OptionConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/OptionGroupConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/OptionGroupConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/OptionGroupConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/OptionGroupConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/PersonConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/PersonConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/PersonConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/PersonConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/ResourceConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/ResourceConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/ResourceConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/ResourceConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/ResourceItemConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/ResourceItemConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/ResourceItemConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/ResourceItemConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/ResourcePersonConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/ResourcePersonConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/ResourcePersonConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/ResourcePersonConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/ResourceTypeConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/ResourceTypeConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/ResourceTypeConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/ResourceTypeConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/VentureAssociateOptionConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/VentureAssociateOptionConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/VentureAssociateOptionConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/VentureAssociateOptionConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/VentureConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/VentureConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/VentureConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/VentureConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/VentureDetailConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/VentureDetailConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/VentureDetailConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/VentureDetailConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/VentureOptionConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/VentureOptionConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/VentureOptionConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/VentureOptionConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/Configurations/VentureResourceConfig.cs b/src/Subjects/Infrastructure.Persistence/Configurations/VentureResourceConfig.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Configurations/VentureResourceConfig.cs rename to src/Subjects/Infrastructure.Persistence/Configurations/VentureResourceConfig.cs diff --git a/src/Subjects/Infrastructure/Persistence/ConfigureServices.cs b/src/Subjects/Infrastructure.Persistence/ConfigureServices.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/ConfigureServices.cs rename to src/Subjects/Infrastructure.Persistence/ConfigureServices.cs diff --git a/src/Subjects/Infrastructure/Persistence/Contexts/SubjectsDbContext.cs b/src/Subjects/Infrastructure.Persistence/Contexts/SubjectsDbContext.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Contexts/SubjectsDbContext.cs rename to src/Subjects/Infrastructure.Persistence/Contexts/SubjectsDbContext.cs diff --git a/src/Subjects/Infrastructure/Persistence/Persistence.csproj b/src/Subjects/Infrastructure.Persistence/Infrastructure.Persistence.csproj similarity index 91% rename from src/Subjects/Infrastructure/Persistence/Persistence.csproj rename to src/Subjects/Infrastructure.Persistence/Infrastructure.Persistence.csproj index 61262111..7d1228a7 100644 --- a/src/Subjects/Infrastructure/Persistence/Persistence.csproj +++ b/src/Subjects/Infrastructure.Persistence/Infrastructure.Persistence.csproj @@ -23,7 +23,6 @@ - - + \ No newline at end of file diff --git a/src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs b/src/Subjects/Infrastructure.Persistence/Repositories/BusinessRepo.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Repositories/BusinessRepo.cs rename to src/Subjects/Infrastructure.Persistence/Repositories/BusinessRepo.cs diff --git a/src/Subjects/Infrastructure/Persistence/Repositories/PersonRepo.cs b/src/Subjects/Infrastructure.Persistence/Repositories/PersonRepo.cs similarity index 100% rename from src/Subjects/Infrastructure/Persistence/Repositories/PersonRepo.cs rename to src/Subjects/Infrastructure.Persistence/Repositories/PersonRepo.cs diff --git a/src/Subjects/Infrastructure/Persistence/favicon.ico b/src/Subjects/Infrastructure.Persistence/favicon.ico similarity index 100% rename from src/Subjects/Infrastructure/Persistence/favicon.ico rename to src/Subjects/Infrastructure.Persistence/favicon.ico diff --git a/src/Subjects/Infrastructure/Persistence/storeicon.png b/src/Subjects/Infrastructure.Persistence/storeicon.png similarity index 100% rename from src/Subjects/Infrastructure/Persistence/storeicon.png rename to src/Subjects/Infrastructure.Persistence/storeicon.png diff --git a/src/Subjects/Presentation/Api.WebApi/Common/ApiExceptionFilterAttribute.cs b/src/Subjects/Presentation.Api.WebApi/Common/ApiExceptionFilterAttribute.cs similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Common/ApiExceptionFilterAttribute.cs rename to src/Subjects/Presentation.Api.WebApi/Common/ApiExceptionFilterAttribute.cs diff --git a/src/Subjects/Presentation/Api.WebApi/Common/BaseController.cs b/src/Subjects/Presentation.Api.WebApi/Common/BaseController.cs similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Common/BaseController.cs rename to src/Subjects/Presentation.Api.WebApi/Common/BaseController.cs diff --git a/src/Subjects/Presentation/Api.WebApi/Common/ConfigureSwaggerOptions.cs b/src/Subjects/Presentation.Api.WebApi/Common/ConfigureSwaggerOptions.cs similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Common/ConfigureSwaggerOptions.cs rename to src/Subjects/Presentation.Api.WebApi/Common/ConfigureSwaggerOptions.cs diff --git a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs b/src/Subjects/Presentation.Api.WebApi/Controllers/BusinessController.cs similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Controllers/BusinessController.cs rename to src/Subjects/Presentation.Api.WebApi/Controllers/BusinessController.cs diff --git a/src/Subjects/Presentation/Api.WebApi/Controllers/BusinessesController.cs b/src/Subjects/Presentation.Api.WebApi/Controllers/BusinessesController.cs similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Controllers/BusinessesController.cs rename to src/Subjects/Presentation.Api.WebApi/Controllers/BusinessesController.cs diff --git a/src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml b/src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Goodtocode.Subjects.WebApi.xml rename to src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml diff --git a/src/Subjects/Presentation/Api.WebApi/Api.WebApi.csproj b/src/Subjects/Presentation.Api.WebApi/Presentation.Api.WebApi.csproj similarity index 95% rename from src/Subjects/Presentation/Api.WebApi/Api.WebApi.csproj rename to src/Subjects/Presentation.Api.WebApi/Presentation.Api.WebApi.csproj index f72136c2..c88d2c67 100644 --- a/src/Subjects/Presentation/Api.WebApi/Api.WebApi.csproj +++ b/src/Subjects/Presentation.Api.WebApi/Presentation.Api.WebApi.csproj @@ -28,6 +28,6 @@ - + diff --git a/src/Subjects/Presentation/Api.WebApi/Program.cs b/src/Subjects/Presentation.Api.WebApi/Program.cs similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Program.cs rename to src/Subjects/Presentation.Api.WebApi/Program.cs diff --git a/src/Subjects/Presentation/Api.WebApi/Properties/ServiceDependencies/local/appInsights1.arm.json b/src/Subjects/Presentation.Api.WebApi/Properties/ServiceDependencies/local/appInsights1.arm.json similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Properties/ServiceDependencies/local/appInsights1.arm.json rename to src/Subjects/Presentation.Api.WebApi/Properties/ServiceDependencies/local/appInsights1.arm.json diff --git a/src/Subjects/Presentation/Api.WebApi/Properties/serviceDependencies.json b/src/Subjects/Presentation.Api.WebApi/Properties/serviceDependencies.json similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Properties/serviceDependencies.json rename to src/Subjects/Presentation.Api.WebApi/Properties/serviceDependencies.json diff --git a/src/Subjects/Presentation/Api.WebApi/Properties/serviceDependencies.local.json b/src/Subjects/Presentation.Api.WebApi/Properties/serviceDependencies.local.json similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/Properties/serviceDependencies.local.json rename to src/Subjects/Presentation.Api.WebApi/Properties/serviceDependencies.local.json diff --git a/src/Subjects/Presentation/Api.WebApi/appsettings.Development.json b/src/Subjects/Presentation.Api.WebApi/appsettings.Development.json similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/appsettings.Development.json rename to src/Subjects/Presentation.Api.WebApi/appsettings.Development.json diff --git a/src/Subjects/Presentation/Api.WebApi/appsettings.Production.json b/src/Subjects/Presentation.Api.WebApi/appsettings.Production.json similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/appsettings.Production.json rename to src/Subjects/Presentation.Api.WebApi/appsettings.Production.json diff --git a/src/Subjects/Presentation/Api.WebApi/appsettings.json b/src/Subjects/Presentation.Api.WebApi/appsettings.json similarity index 100% rename from src/Subjects/Presentation/Api.WebApi/appsettings.json rename to src/Subjects/Presentation.Api.WebApi/appsettings.json diff --git a/src/Subjects/Presentation/Web.BlazorServer/.config/dotnet-tools.json b/src/Subjects/Presentation.Web.BlazorServer/.config/dotnet-tools.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/.config/dotnet-tools.json rename to src/Subjects/Presentation.Web.BlazorServer/.config/dotnet-tools.json diff --git a/src/Subjects/Presentation/Web.BlazorServer/App.razor b/src/Subjects/Presentation.Web.BlazorServer/App.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/App.razor rename to src/Subjects/Presentation.Web.BlazorServer/App.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/Data/BusinessService.cs b/src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Data/BusinessService.cs rename to src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs diff --git a/src/Subjects/Presentation/Web.BlazorServer/Data/WeatherForecast.cs b/src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecast.cs similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Data/WeatherForecast.cs rename to src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecast.cs diff --git a/src/Subjects/Presentation/Web.BlazorServer/Data/WeatherForecastService.cs b/src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecastService.cs similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Data/WeatherForecastService.cs rename to src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecastService.cs diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessCreate.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessCreate.razor rename to src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessList.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Pages/Business/BusinessList.razor rename to src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/Error.cshtml b/src/Subjects/Presentation.Web.BlazorServer/Pages/Error.cshtml similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Pages/Error.cshtml rename to src/Subjects/Presentation.Web.BlazorServer/Pages/Error.cshtml diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/Error.cshtml.cs b/src/Subjects/Presentation.Web.BlazorServer/Pages/Error.cshtml.cs similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Pages/Error.cshtml.cs rename to src/Subjects/Presentation.Web.BlazorServer/Pages/Error.cshtml.cs diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/Index.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/Index.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Pages/Index.razor rename to src/Subjects/Presentation.Web.BlazorServer/Pages/Index.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/To-Delete/Counter.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/Counter.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Pages/To-Delete/Counter.razor rename to src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/Counter.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/To-Delete/FetchData.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/FetchData.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Pages/To-Delete/FetchData.razor rename to src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/FetchData.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/Pages/_Host.cshtml b/src/Subjects/Presentation.Web.BlazorServer/Pages/_Host.cshtml similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Pages/_Host.cshtml rename to src/Subjects/Presentation.Web.BlazorServer/Pages/_Host.cshtml diff --git a/src/Subjects/Presentation/Web.BlazorServer/Web.BlazorServer.csproj b/src/Subjects/Presentation.Web.BlazorServer/Presentation.Web.BlazorServer.csproj similarity index 87% rename from src/Subjects/Presentation/Web.BlazorServer/Web.BlazorServer.csproj rename to src/Subjects/Presentation.Web.BlazorServer/Presentation.Web.BlazorServer.csproj index dedb6c05..7b8fa7e1 100644 --- a/src/Subjects/Presentation/Web.BlazorServer/Web.BlazorServer.csproj +++ b/src/Subjects/Presentation.Web.BlazorServer/Presentation.Web.BlazorServer.csproj @@ -23,8 +23,8 @@ - - + + diff --git a/src/Subjects/Presentation/Web.BlazorServer/Program.cs b/src/Subjects/Presentation.Web.BlazorServer/Program.cs similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Program.cs rename to src/Subjects/Presentation.Web.BlazorServer/Program.cs diff --git a/src/Subjects/Presentation/Web.BlazorServer/Properties/serviceDependencies.json b/src/Subjects/Presentation.Web.BlazorServer/Properties/serviceDependencies.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Properties/serviceDependencies.json rename to src/Subjects/Presentation.Web.BlazorServer/Properties/serviceDependencies.json diff --git a/src/Subjects/Presentation/Web.BlazorServer/Properties/serviceDependencies.local.json b/src/Subjects/Presentation.Web.BlazorServer/Properties/serviceDependencies.local.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Properties/serviceDependencies.local.json rename to src/Subjects/Presentation.Web.BlazorServer/Properties/serviceDependencies.local.json diff --git a/src/Subjects/Presentation/Web.BlazorServer/Shared/LoginDisplay.razor b/src/Subjects/Presentation.Web.BlazorServer/Shared/LoginDisplay.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Shared/LoginDisplay.razor rename to src/Subjects/Presentation.Web.BlazorServer/Shared/LoginDisplay.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/Shared/MainLayout.razor b/src/Subjects/Presentation.Web.BlazorServer/Shared/MainLayout.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Shared/MainLayout.razor rename to src/Subjects/Presentation.Web.BlazorServer/Shared/MainLayout.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/Shared/MainLayout.razor.css b/src/Subjects/Presentation.Web.BlazorServer/Shared/MainLayout.razor.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Shared/MainLayout.razor.css rename to src/Subjects/Presentation.Web.BlazorServer/Shared/MainLayout.razor.css diff --git a/src/Subjects/Presentation/Web.BlazorServer/Shared/NavMenu.razor b/src/Subjects/Presentation.Web.BlazorServer/Shared/NavMenu.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Shared/NavMenu.razor rename to src/Subjects/Presentation.Web.BlazorServer/Shared/NavMenu.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/Shared/NavMenu.razor.css b/src/Subjects/Presentation.Web.BlazorServer/Shared/NavMenu.razor.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Shared/NavMenu.razor.css rename to src/Subjects/Presentation.Web.BlazorServer/Shared/NavMenu.razor.css diff --git a/src/Subjects/Presentation/Web.BlazorServer/Shared/SurveyPrompt.razor b/src/Subjects/Presentation.Web.BlazorServer/Shared/SurveyPrompt.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/Shared/SurveyPrompt.razor rename to src/Subjects/Presentation.Web.BlazorServer/Shared/SurveyPrompt.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/_Imports.razor b/src/Subjects/Presentation.Web.BlazorServer/_Imports.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/_Imports.razor rename to src/Subjects/Presentation.Web.BlazorServer/_Imports.razor diff --git a/src/Subjects/Presentation/Web.BlazorServer/appsettings.Development.json b/src/Subjects/Presentation.Web.BlazorServer/appsettings.Development.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/appsettings.Development.json rename to src/Subjects/Presentation.Web.BlazorServer/appsettings.Development.json diff --git a/src/Subjects/Presentation/Web.BlazorServer/appsettings.json b/src/Subjects/Presentation.Web.BlazorServer/appsettings.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/appsettings.json rename to src/Subjects/Presentation.Web.BlazorServer/appsettings.json diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/bootstrap/bootstrap.min.css b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/bootstrap/bootstrap.min.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/bootstrap/bootstrap.min.css rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/bootstrap/bootstrap.min.css diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/bootstrap/bootstrap.min.css.map b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/bootstrap/bootstrap.min.css.map similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/bootstrap/bootstrap.min.css.map rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/bootstrap/bootstrap.min.css.map diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/FONT-LICENSE b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/FONT-LICENSE similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/FONT-LICENSE rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/FONT-LICENSE diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/ICON-LICENSE b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/ICON-LICENSE similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/ICON-LICENSE rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/ICON-LICENSE diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/README.md b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/README.md similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/README.md rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/README.md diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.svg b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.svg similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.svg rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.svg diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/site.css b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/site.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/css/site.css rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/site.css diff --git a/src/Subjects/Presentation/Web.BlazorServer/wwwroot/favicon.png b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/favicon.png similarity index 100% rename from src/Subjects/Presentation/Web.BlazorServer/wwwroot/favicon.png rename to src/Subjects/Presentation.Web.BlazorServer/wwwroot/favicon.png diff --git a/src/Subjects/Presentation/Web.BlazorStatic/.config/dotnet-tools.json b/src/Subjects/Presentation.Web.BlazorStatic/.config/dotnet-tools.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/.config/dotnet-tools.json rename to src/Subjects/Presentation.Web.BlazorStatic/.config/dotnet-tools.json diff --git a/src/Subjects/Presentation/Web.BlazorStatic/App.razor b/src/Subjects/Presentation.Web.BlazorStatic/App.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/App.razor rename to src/Subjects/Presentation.Web.BlazorStatic/App.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Pages/Authentication.razor b/src/Subjects/Presentation.Web.BlazorStatic/Pages/Authentication.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Pages/Authentication.razor rename to src/Subjects/Presentation.Web.BlazorStatic/Pages/Authentication.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Pages/Counter.razor b/src/Subjects/Presentation.Web.BlazorStatic/Pages/Counter.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Pages/Counter.razor rename to src/Subjects/Presentation.Web.BlazorStatic/Pages/Counter.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Pages/FetchData.razor b/src/Subjects/Presentation.Web.BlazorStatic/Pages/FetchData.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Pages/FetchData.razor rename to src/Subjects/Presentation.Web.BlazorStatic/Pages/FetchData.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Pages/Index.razor b/src/Subjects/Presentation.Web.BlazorStatic/Pages/Index.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Pages/Index.razor rename to src/Subjects/Presentation.Web.BlazorStatic/Pages/Index.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Web.BlazorStatic.csproj b/src/Subjects/Presentation.Web.BlazorStatic/Presentation.Web.BlazorStatic.csproj similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Web.BlazorStatic.csproj rename to src/Subjects/Presentation.Web.BlazorStatic/Presentation.Web.BlazorStatic.csproj diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Program.cs b/src/Subjects/Presentation.Web.BlazorStatic/Program.cs similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Program.cs rename to src/Subjects/Presentation.Web.BlazorStatic/Program.cs diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Properties/serviceDependencies.json b/src/Subjects/Presentation.Web.BlazorStatic/Properties/serviceDependencies.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Properties/serviceDependencies.json rename to src/Subjects/Presentation.Web.BlazorStatic/Properties/serviceDependencies.json diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Properties/serviceDependencies.local.json b/src/Subjects/Presentation.Web.BlazorStatic/Properties/serviceDependencies.local.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Properties/serviceDependencies.local.json rename to src/Subjects/Presentation.Web.BlazorStatic/Properties/serviceDependencies.local.json diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Shared/LoginDisplay.razor b/src/Subjects/Presentation.Web.BlazorStatic/Shared/LoginDisplay.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Shared/LoginDisplay.razor rename to src/Subjects/Presentation.Web.BlazorStatic/Shared/LoginDisplay.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Shared/MainLayout.razor b/src/Subjects/Presentation.Web.BlazorStatic/Shared/MainLayout.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Shared/MainLayout.razor rename to src/Subjects/Presentation.Web.BlazorStatic/Shared/MainLayout.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Shared/MainLayout.razor.css b/src/Subjects/Presentation.Web.BlazorStatic/Shared/MainLayout.razor.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Shared/MainLayout.razor.css rename to src/Subjects/Presentation.Web.BlazorStatic/Shared/MainLayout.razor.css diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Shared/NavMenu.razor b/src/Subjects/Presentation.Web.BlazorStatic/Shared/NavMenu.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Shared/NavMenu.razor rename to src/Subjects/Presentation.Web.BlazorStatic/Shared/NavMenu.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Shared/NavMenu.razor.css b/src/Subjects/Presentation.Web.BlazorStatic/Shared/NavMenu.razor.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Shared/NavMenu.razor.css rename to src/Subjects/Presentation.Web.BlazorStatic/Shared/NavMenu.razor.css diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Shared/RedirectToLogin.razor b/src/Subjects/Presentation.Web.BlazorStatic/Shared/RedirectToLogin.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Shared/RedirectToLogin.razor rename to src/Subjects/Presentation.Web.BlazorStatic/Shared/RedirectToLogin.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/Shared/SurveyPrompt.razor b/src/Subjects/Presentation.Web.BlazorStatic/Shared/SurveyPrompt.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/Shared/SurveyPrompt.razor rename to src/Subjects/Presentation.Web.BlazorStatic/Shared/SurveyPrompt.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/_Imports.razor b/src/Subjects/Presentation.Web.BlazorStatic/_Imports.razor similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/_Imports.razor rename to src/Subjects/Presentation.Web.BlazorStatic/_Imports.razor diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/appsettings.json b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/appsettings.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/appsettings.json rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/appsettings.json diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/app.css b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/app.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/app.css rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/app.css diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/bootstrap/bootstrap.min.css b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/bootstrap/bootstrap.min.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/bootstrap/bootstrap.min.css rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/bootstrap/bootstrap.min.css diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/bootstrap/bootstrap.min.css.map b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/bootstrap/bootstrap.min.css.map similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/bootstrap/bootstrap.min.css.map rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/bootstrap/bootstrap.min.css.map diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/FONT-LICENSE b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/FONT-LICENSE similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/FONT-LICENSE rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/FONT-LICENSE diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/ICON-LICENSE b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/ICON-LICENSE similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/ICON-LICENSE rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/ICON-LICENSE diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/README.md b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/README.md similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/README.md rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/README.md diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.eot b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.eot similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.eot rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.eot diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.otf b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.otf similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.otf rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.otf diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.svg b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.svg similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.svg rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.svg diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.woff b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.woff similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.woff rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/css/open-iconic/font/fonts/open-iconic.woff diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/favicon.png b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/favicon.png similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/favicon.png rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/favicon.png diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/icon-192.png b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/icon-192.png similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/icon-192.png rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/icon-192.png diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/icon-512.png b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/icon-512.png similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/icon-512.png rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/icon-512.png diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/index.html b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/index.html similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/index.html rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/index.html diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/manifest.json b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/manifest.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/manifest.json rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/manifest.json diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/sample-data/weather.json b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/sample-data/weather.json similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/sample-data/weather.json rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/sample-data/weather.json diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/service-worker.js b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/service-worker.js similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/service-worker.js rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/service-worker.js diff --git a/src/Subjects/Presentation/Web.BlazorStatic/wwwroot/service-worker.published.js b/src/Subjects/Presentation.Web.BlazorStatic/wwwroot/service-worker.published.js similarity index 100% rename from src/Subjects/Presentation/Web.BlazorStatic/wwwroot/service-worker.published.js rename to src/Subjects/Presentation.Web.BlazorStatic/wwwroot/service-worker.published.js diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature b/src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature rename to src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommand.feature.cs rename to src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature.cs diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/UpdateBusinessCommand.feature b/src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Commands/UpdateBusinessCommand.feature rename to src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/UpdateBusinessCommand.feature.cs b/src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Commands/UpdateBusinessCommand.feature.cs rename to src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature.cs diff --git a/src/Subjects/Specs/Application.Integration/Business/Commands/UpdateBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommandStepDefinitions.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Commands/UpdateBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommandStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByKey.feature b/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKey.feature similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByKey.feature rename to src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKey.feature diff --git a/src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByKey.feature.cs b/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKey.feature.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByKey.feature.cs rename to src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKey.feature.cs diff --git a/src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByKeyStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKeyStepDefinitions.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByKeyStepDefinitions.cs rename to src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKeyStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByName.feature b/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByName.feature similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByName.feature rename to src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByName.feature diff --git a/src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByName.feature.cs b/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByName.feature.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByName.feature.cs rename to src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByName.feature.cs diff --git a/src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByNameStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByNameStepDefinitions.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Business/Queries/GetBusinessesByNameStepDefinitions.cs rename to src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByNameStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Integration/Common/ContextSeeder.cs b/src/Subjects/Specs.Integration/Common/ContextSeeder.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Common/ContextSeeder.cs rename to src/Subjects/Specs.Integration/Common/ContextSeeder.cs diff --git a/src/Subjects/Specs/Application.Integration/Common/IContextSeeder.cs b/src/Subjects/Specs.Integration/Common/IContextSeeder.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Common/IContextSeeder.cs rename to src/Subjects/Specs.Integration/Common/IContextSeeder.cs diff --git a/src/Subjects/Specs/Application.Integration/Common/ResponseTypes.cs b/src/Subjects/Specs.Integration/Common/ResponseTypes.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/Common/ResponseTypes.cs rename to src/Subjects/Specs.Integration/Common/ResponseTypes.cs diff --git a/src/Subjects/Specs/Application.Integration/ImplicitUsings.cs b/src/Subjects/Specs.Integration/ImplicitUsings.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/ImplicitUsings.cs rename to src/Subjects/Specs.Integration/ImplicitUsings.cs diff --git a/src/Subjects/Specs/Application.Integration/Application.Integration.csproj b/src/Subjects/Specs.Integration/Specs.Integration.csproj similarity index 97% rename from src/Subjects/Specs/Application.Integration/Application.Integration.csproj rename to src/Subjects/Specs.Integration/Specs.Integration.csproj index fe101319..fe83c849 100644 --- a/src/Subjects/Specs/Application.Integration/Application.Integration.csproj +++ b/src/Subjects/Specs.Integration/Specs.Integration.csproj @@ -29,7 +29,7 @@ - + diff --git a/src/Subjects/Specs/Application.Integration/TestBase.cs b/src/Subjects/Specs.Integration/TestBase.cs similarity index 100% rename from src/Subjects/Specs/Application.Integration/TestBase.cs rename to src/Subjects/Specs.Integration/TestBase.cs diff --git a/src/Subjects/Specs/Application.Integration/appsettings.test.json b/src/Subjects/Specs.Integration/appsettings.test.json similarity index 100% rename from src/Subjects/Specs/Application.Integration/appsettings.test.json rename to src/Subjects/Specs.Integration/appsettings.test.json diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature b/src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommand.feature similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature rename to src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommand.feature diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature.cs b/src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommand.feature.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommand.feature.cs rename to src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommand.feature.cs diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature b/src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommand.feature similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature rename to src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommand.feature diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommand.feature.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommand.feature.cs rename to src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommand.feature.cs diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommand.feature b/src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommand.feature similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommand.feature rename to src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommand.feature diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommand.feature.cs b/src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommand.feature.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommand.feature.cs rename to src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommand.feature.cs diff --git a/src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByKey.feature b/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKey.feature similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByKey.feature rename to src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKey.feature diff --git a/src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByKey.feature.cs b/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKey.feature.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByKey.feature.cs rename to src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKey.feature.cs diff --git a/src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByKeyStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKeyStepDefinitions.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByKeyStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKeyStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByName.feature b/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByName.feature similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByName.feature rename to src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByName.feature diff --git a/src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByName.feature.cs b/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByName.feature.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByName.feature.cs rename to src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByName.feature.cs diff --git a/src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByNameStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByNameStepDefinitions.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Business/Queries/GetBusinessesByNameStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByNameStepDefinitions.cs diff --git a/src/Subjects/Specs/Application.Unit/Common/ResponseTypes.cs b/src/Subjects/Specs.Unit/Common/ResponseTypes.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Common/ResponseTypes.cs rename to src/Subjects/Specs.Unit/Common/ResponseTypes.cs diff --git a/src/Subjects/Specs/Application.Unit/ImplicitUsings.cs b/src/Subjects/Specs.Unit/ImplicitUsings.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/ImplicitUsings.cs rename to src/Subjects/Specs.Unit/ImplicitUsings.cs diff --git a/src/Subjects/Specs/Application.Unit/Application.Unit.csproj b/src/Subjects/Specs.Unit/Specs.Unit.csproj similarity index 97% rename from src/Subjects/Specs/Application.Unit/Application.Unit.csproj rename to src/Subjects/Specs.Unit/Specs.Unit.csproj index a8a396e2..ac696e29 100644 --- a/src/Subjects/Specs/Application.Unit/Application.Unit.csproj +++ b/src/Subjects/Specs.Unit/Specs.Unit.csproj @@ -28,7 +28,7 @@ - + diff --git a/src/Subjects/Specs/Application.Unit/TestBase.cs b/src/Subjects/Specs.Unit/TestBase.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/TestBase.cs rename to src/Subjects/Specs.Unit/TestBase.cs diff --git a/src/Subjects/Specs/Application.Unit/Usings.cs b/src/Subjects/Specs.Unit/Usings.cs similarity index 100% rename from src/Subjects/Specs/Application.Unit/Usings.cs rename to src/Subjects/Specs.Unit/Usings.cs diff --git a/src/Subjects/Specs/Application.Unit/appsettings.test.json b/src/Subjects/Specs.Unit/appsettings.test.json similarity index 100% rename from src/Subjects/Specs/Application.Unit/appsettings.test.json rename to src/Subjects/Specs.Unit/appsettings.test.json diff --git a/src/Subjects/Specs/Application.Unit/favicon.ico b/src/Subjects/Specs.Unit/favicon.ico similarity index 100% rename from src/Subjects/Specs/Application.Unit/favicon.ico rename to src/Subjects/Specs.Unit/favicon.ico diff --git a/src/Subjects/Specs/Application.Unit/storeicon.png b/src/Subjects/Specs.Unit/storeicon.png similarity index 100% rename from src/Subjects/Specs/Application.Unit/storeicon.png rename to src/Subjects/Specs.Unit/storeicon.png From db1243f140d55e93c3cb6be87563134d184fea98 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 15:55:24 -0700 Subject: [PATCH 11/26] Delete now tests alongside Update --- .../DeleteBusinessCommand.feature | 4 +-- .../DeleteBusinessCommand.feature.cs | 8 ++--- .../DeleteBusinessCommandStepDefinitions.cs | 4 +-- .../{Queries => }/GetBusinessesByKey.feature | 0 .../Business}/GetBusinessesByKey.feature.cs | 4 +-- .../GetBusinessesByKeyStepDefinitions.cs | 2 +- .../{Queries => }/GetBusinessesByName.feature | 0 .../Business}/GetBusinessesByName.feature.cs | 4 +-- .../GetBusinessesByNameStepDefinitions.cs | 4 +-- .../UpdateBusinessCommand.feature | 4 +-- .../UpdateBusinessCommand.feature.cs | 8 ++--- .../UpdateBusinessCommandStepDefinitions.cs | 4 +-- .../Specs.Integration/Common/ContextSeeder.cs | 33 +++++++++++-------- .../Specs.Integration.csproj | 24 ++++---------- .../{Commands => }/AddBusinessCommand.feature | 0 .../AddBusinessCommand.feature.cs | 4 +-- .../AddBusinessCommandStepDefinitions.cs | 2 +- .../DeleteBusinessCommand.feature | 0 .../DeleteBusinessCommand.feature.cs | 4 +-- .../DeleteBusinessCommandStepDefinitions.cs | 2 +- .../{Queries => }/GetBusinessesByKey.feature | 0 .../Business}/GetBusinessesByKey.feature.cs | 4 +-- .../GetBusinessesByKeyStepDefinitions.cs | 2 +- .../{Queries => }/GetBusinessesByName.feature | 0 .../Business}/GetBusinessesByName.feature.cs | 4 +-- .../GetBusinessesByNameStepDefinitions.cs | 4 +-- .../UpdateBusinessCommand.feature | 0 .../UpdateBusinessCommand.feature.cs | 4 +-- .../UpdateBusinessCommandStepDefinitions.cs | 2 +- src/Subjects/Specs.Unit/Specs.Unit.csproj | 26 ++++++--------- 30 files changed, 75 insertions(+), 86 deletions(-) rename src/Subjects/Specs.Integration/Business/{Commands => }/DeleteBusinessCommand.feature (83%) rename src/Subjects/Specs.Integration/Business/{Commands => }/DeleteBusinessCommand.feature.cs (93%) rename src/Subjects/Specs.Integration/Business/{Commands => }/DeleteBusinessCommandStepDefinitions.cs (96%) rename src/Subjects/Specs.Integration/Business/{Queries => }/GetBusinessesByKey.feature (100%) rename src/Subjects/{Specs.Unit/Business/Queries => Specs.Integration/Business}/GetBusinessesByKey.feature.cs (96%) rename src/Subjects/Specs.Integration/Business/{Queries => }/GetBusinessesByKeyStepDefinitions.cs (98%) rename src/Subjects/Specs.Integration/Business/{Queries => }/GetBusinessesByName.feature (100%) rename src/Subjects/{Specs.Unit/Business/Queries => Specs.Integration/Business}/GetBusinessesByName.feature.cs (96%) rename src/Subjects/Specs.Integration/Business/{Queries => }/GetBusinessesByNameStepDefinitions.cs (97%) rename src/Subjects/Specs.Integration/Business/{Commands => }/UpdateBusinessCommand.feature (95%) rename src/Subjects/Specs.Integration/Business/{Commands => }/UpdateBusinessCommand.feature.cs (95%) rename src/Subjects/Specs.Integration/Business/{Commands => }/UpdateBusinessCommandStepDefinitions.cs (96%) rename src/Subjects/Specs.Unit/Business/{Commands => }/AddBusinessCommand.feature (100%) rename src/Subjects/Specs.Unit/Business/{Commands => }/AddBusinessCommand.feature.cs (96%) rename src/Subjects/Specs.Unit/Business/{Commands => }/AddBusinessCommandStepDefinitions.cs (98%) rename src/Subjects/Specs.Unit/Business/{Commands => }/DeleteBusinessCommand.feature (100%) rename src/Subjects/Specs.Unit/Business/{Commands => }/DeleteBusinessCommand.feature.cs (96%) rename src/Subjects/Specs.Unit/Business/{Commands => }/DeleteBusinessCommandStepDefinitions.cs (98%) rename src/Subjects/Specs.Unit/Business/{Queries => }/GetBusinessesByKey.feature (100%) rename src/Subjects/{Specs.Integration/Business/Queries => Specs.Unit/Business}/GetBusinessesByKey.feature.cs (96%) rename src/Subjects/Specs.Unit/Business/{Queries => }/GetBusinessesByKeyStepDefinitions.cs (98%) rename src/Subjects/Specs.Unit/Business/{Queries => }/GetBusinessesByName.feature (100%) rename src/Subjects/{Specs.Integration/Business/Queries => Specs.Unit/Business}/GetBusinessesByName.feature.cs (96%) rename src/Subjects/Specs.Unit/Business/{Queries => }/GetBusinessesByNameStepDefinitions.cs (97%) rename src/Subjects/Specs.Unit/Business/{Commands => }/UpdateBusinessCommand.feature (100%) rename src/Subjects/Specs.Unit/Business/{Commands => }/UpdateBusinessCommand.feature.cs (96%) rename src/Subjects/Specs.Unit/Business/{Commands => }/UpdateBusinessCommandStepDefinitions.cs (98%) diff --git a/src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature b/src/Subjects/Specs.Integration/Business/DeleteBusinessCommand.feature similarity index 83% rename from src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature rename to src/Subjects/Specs.Integration/Business/DeleteBusinessCommand.feature index c2967d75..bc533114 100644 --- a/src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature +++ b/src/Subjects/Specs.Integration/Business/DeleteBusinessCommand.feature @@ -13,7 +13,7 @@ Scenario: Delete business Examples: | def | response | responseErrors | requestBusinessKey | - | success TaxNumber BusinessKey | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | - | not found BusinessKey | NotFound | | 12345600-1234-1234-1234-123400000000 | + | success TaxNumber BusinessKey | Success | | 038213ba-9d95-42f3-8e8b-126cec10481b | + | not found BusinessKey | NotFound | | 038213ba-9d95-42f3-8e8b-126cec10481b | | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | | bad request non-guid BusinessKey | BadRequest | BusinessKey | 11111 | \ No newline at end of file diff --git a/src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs.Integration/Business/DeleteBusinessCommand.feature.cs similarity index 93% rename from src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature.cs rename to src/Subjects/Specs.Integration/Business/DeleteBusinessCommand.feature.cs index 0e36e580..fec40662 100644 --- a/src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommand.feature.cs +++ b/src/Subjects/Specs.Integration/Business/DeleteBusinessCommand.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Integration.Business.Commands +namespace Goodtocode.Subjects.Integration.Business { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class DeleteBusinessCommandFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands", "Delete Business Command", "As an customer service agent\r\nI delete the business\r\nThe business is deleted from" + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Delete Business Command", "As an customer service agent\r\nI delete the business\r\nThe business is deleted from" + " the system of record", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } @@ -78,8 +78,8 @@ public void ScenarioCleanup() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Delete business")] - [NUnit.Framework.TestCaseAttribute("success TaxNumber BusinessKey", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", null)] - [NUnit.Framework.TestCaseAttribute("not found BusinessKey", "NotFound", "", "12345600-1234-1234-1234-123400000000", null)] + [NUnit.Framework.TestCaseAttribute("success TaxNumber BusinessKey", "Success", "", "038213ba-9d95-42f3-8e8b-126cec10481b", null)] + [NUnit.Framework.TestCaseAttribute("not found BusinessKey", "NotFound", "", "038213ba-9d95-42f3-8e8b-126cec10481b", null)] [NUnit.Framework.TestCaseAttribute("bad request Empty BusinessKey", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", null)] [NUnit.Framework.TestCaseAttribute("bad request non-guid BusinessKey", "BadRequest", "BusinessKey", "11111", null)] public void DeleteBusiness(string def, string response, string responseErrors, string requestBusinessKey, string[] exampleTags) diff --git a/src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/DeleteBusinessCommandStepDefinitions.cs similarity index 96% rename from src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Integration/Business/DeleteBusinessCommandStepDefinitions.cs index 46b78792..c7ca2eb9 100644 --- a/src/Subjects/Specs.Integration/Business/Commands/DeleteBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/DeleteBusinessCommandStepDefinitions.cs @@ -5,7 +5,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Integration.Common.ResponseTypes; -namespace Goodtocode.Subjects.Integration.Business.Commands; +namespace Goodtocode.Subjects.Integration.Business; [Binding] [Scope(Tag = "deleteBusinessCommand")] @@ -44,7 +44,7 @@ public async Task WhenIDeleteTheBusiness() if (_validationErrors.IsValid) try { - var handler = new DeleteBusinessCommandHandler(base.BusinessRepo); + var handler = new DeleteBusinessCommandHandler(BusinessRepo); await handler.Handle(request, CancellationToken.None); _responseType = CommandResponseType.Successful; } diff --git a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKey.feature b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature similarity index 100% rename from src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKey.feature rename to src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature diff --git a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKey.feature.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs similarity index 96% rename from src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKey.feature.cs rename to src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs index bbd9139c..f96856ab 100644 --- a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKey.feature.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Unit.Business.Queries +namespace Goodtocode.Subjects.Integration.Business { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class FindBusinessesByKeyFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Queries", "Find Businesses by key", "\tAs a customer service rep\r\n\tWhen I search for a business by key critera\r\n\tI can " + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Find Businesses by key", "\tAs a customer service rep\r\n\tWhen I search for a business by key critera\r\n\tI can " + "see a exact match for a business", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } diff --git a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKeyStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs similarity index 98% rename from src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKeyStepDefinitions.cs rename to src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs index cd5b6626..9443a4ce 100644 --- a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKeyStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs @@ -6,7 +6,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Integration.Common.ResponseTypes; -namespace Goodtocode.Subjects.Integration.Business.Queries; +namespace Goodtocode.Subjects.Integration.Business; [Binding] [Scope(Tag = "getBusinessesByKey")] diff --git a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByName.feature b/src/Subjects/Specs.Integration/Business/GetBusinessesByName.feature similarity index 100% rename from src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByName.feature rename to src/Subjects/Specs.Integration/Business/GetBusinessesByName.feature diff --git a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByName.feature.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByName.feature.cs similarity index 96% rename from src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByName.feature.cs rename to src/Subjects/Specs.Integration/Business/GetBusinessesByName.feature.cs index 059a2c6e..473f7b2e 100644 --- a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByName.feature.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByName.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Unit.Business.Queries +namespace Goodtocode.Subjects.Integration.Business { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class FindBusinessesByNameFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Queries", "Find Businesses by name", "\tAs a customer service rep\r\n\tWhen I search for a business by name critera\r\n\tI can" + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Find Businesses by name", "\tAs a customer service rep\r\n\tWhen I search for a business by name critera\r\n\tI can" + " see a list of businesses that match the name criteria", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } diff --git a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByNameStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByNameStepDefinitions.cs similarity index 97% rename from src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByNameStepDefinitions.cs rename to src/Subjects/Specs.Integration/Business/GetBusinessesByNameStepDefinitions.cs index e195c63e..0fe4e303 100644 --- a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByNameStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByNameStepDefinitions.cs @@ -6,7 +6,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Integration.Common.ResponseTypes; -namespace Goodtocode.Subjects.Integration.Business.Queries; +namespace Goodtocode.Subjects.Integration.Business; [Binding] [Scope(Tag = "getBusinessesByName")] @@ -17,7 +17,7 @@ public class GetBusinessesByNameStepDefinitions : TestBase private List _response = new(); private CommandResponseType _responseType; private ValidationResult _validationErrors = new(); - private string _businessName = String.Empty; + private string _businessName = string.Empty; private bool _businessExists; [Given(@"I have a def ""([^""]*)""")] diff --git a/src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature b/src/Subjects/Specs.Integration/Business/UpdateBusinessCommand.feature similarity index 95% rename from src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature rename to src/Subjects/Specs.Integration/Business/UpdateBusinessCommand.feature index 87ef5ef2..c3679e38 100644 --- a/src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature +++ b/src/Subjects/Specs.Integration/Business/UpdateBusinessCommand.feature @@ -16,9 +16,9 @@ Scenario: Update business Examples: | def | response | responseErrors | requestBusinessKey | requestBusinessName | requestTaxNumber | | success TaxNumber Add | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | businessName | 123-4567 | - | success TaxNumber Update | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | businessName | 123-4567 | + | success TaxNumber Update | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | businessName | 123-5678 | | success TaxNumber Remove | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | businessName | | - | success Name Update | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | businessName | 123-4567 | + | success Name Update | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | businessName Updates | 123-4567 | | bad request Invalid BusinessKey | BadRequest | BusinessKey | 11111 | businessName | 123-4567 | | bad request Invalid BusinessName | BadRequest | BusinessName | d1604a05-f883-40f1-803b-8562b5674f1a | | 123-4567 | | bad request | BadRequest | BusinessKey,BusinessName | 11111 | | | \ No newline at end of file diff --git a/src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature.cs b/src/Subjects/Specs.Integration/Business/UpdateBusinessCommand.feature.cs similarity index 95% rename from src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature.cs rename to src/Subjects/Specs.Integration/Business/UpdateBusinessCommand.feature.cs index 6cf8ae41..d70920fb 100644 --- a/src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommand.feature.cs +++ b/src/Subjects/Specs.Integration/Business/UpdateBusinessCommand.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Integration.Business.Commands +namespace Goodtocode.Subjects.Integration.Business { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class UpdateBusinessCommandFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands", "Update Business Command", "As an customer service agent\r\nI can change business information\r\nAnd get the syst" + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Update Business Command", "As an customer service agent\r\nI can change business information\r\nAnd get the syst" + "em of record updated", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } @@ -79,9 +79,9 @@ public void ScenarioCleanup() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Update business")] [NUnit.Framework.TestCaseAttribute("success TaxNumber Add", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", "businessName", "123-4567", null)] - [NUnit.Framework.TestCaseAttribute("success TaxNumber Update", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", "businessName", "123-4567", null)] + [NUnit.Framework.TestCaseAttribute("success TaxNumber Update", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", "businessName", "123-5678", null)] [NUnit.Framework.TestCaseAttribute("success TaxNumber Remove", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", "businessName", "", null)] - [NUnit.Framework.TestCaseAttribute("success Name Update", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", "businessName", "123-4567", null)] + [NUnit.Framework.TestCaseAttribute("success Name Update", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", "businessName Updates", "123-4567", null)] [NUnit.Framework.TestCaseAttribute("bad request Invalid BusinessKey", "BadRequest", "BusinessKey", "11111", "businessName", "123-4567", null)] [NUnit.Framework.TestCaseAttribute("bad request Invalid BusinessName", "BadRequest", "BusinessName", "d1604a05-f883-40f1-803b-8562b5674f1a", "", "123-4567", null)] [NUnit.Framework.TestCaseAttribute("bad request", "BadRequest", "BusinessKey,BusinessName", "11111", "", "", null)] diff --git a/src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/UpdateBusinessCommandStepDefinitions.cs similarity index 96% rename from src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Integration/Business/UpdateBusinessCommandStepDefinitions.cs index 9daca34c..4e2f5c9d 100644 --- a/src/Subjects/Specs.Integration/Business/Commands/UpdateBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/UpdateBusinessCommandStepDefinitions.cs @@ -5,7 +5,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Integration.Common.ResponseTypes; -namespace Goodtocode.Subjects.Integration.Business.Commands; +namespace Goodtocode.Subjects.Integration.Business; [Binding] [Scope(Tag = "updateBusinessCommand")] @@ -61,7 +61,7 @@ public async Task WhenIUpdateTheBusiness() if (_validationErrors.IsValid) try { - var handler = new UpdateBusinessCommandHandler(base.BusinessRepo); + var handler = new UpdateBusinessCommandHandler(BusinessRepo); await handler.Handle(request, CancellationToken.None); _responseType = CommandResponseType.Successful; } diff --git a/src/Subjects/Specs.Integration/Common/ContextSeeder.cs b/src/Subjects/Specs.Integration/Common/ContextSeeder.cs index b169bc96..65ca2eeb 100644 --- a/src/Subjects/Specs.Integration/Common/ContextSeeder.cs +++ b/src/Subjects/Specs.Integration/Common/ContextSeeder.cs @@ -6,19 +6,26 @@ internal class ContextSeeder : IContextSeeder { public async Task SeedSampleDataAsync(ISubjectsDbContext context) { - await context.Business.AddRangeAsync(new List { - new BusinessEntity() - { - BusinessKey = new Guid("2016a497-e56c-4be8-8ef6-3dc5ae1699ce"), - BusinessName = "BusinessInDb", - TaxNumber = "123-45678" - }, - new BusinessEntity() - { - BusinessKey = new Guid("d1604a05-f883-40f1-803b-8562b5674f1a"), - BusinessName = "BusinessInDb", - TaxNumber = "123-45678" - } + await context.Business.AddRangeAsync(new List + { + new BusinessEntity() + { + BusinessKey = new Guid("2016a497-e56c-4be8-8ef6-3dc5ae1699ce"), + BusinessName = "BusinessInDb", + TaxNumber = "123-45678" + }, + new BusinessEntity() + { + BusinessKey = new Guid("d1604a05-f883-40f1-803b-8562b5674f1a"), + BusinessName = "Business To Update", + TaxNumber = "123-45678" + }, + new BusinessEntity() + { + BusinessKey = new Guid("038213ba-9d95-42f3-8e8b-126cec10481b"), + BusinessName = "Business To Delete", + TaxNumber = "123-45678" + } } ); diff --git a/src/Subjects/Specs.Integration/Specs.Integration.csproj b/src/Subjects/Specs.Integration/Specs.Integration.csproj index fe83c849..3d31b46d 100644 --- a/src/Subjects/Specs.Integration/Specs.Integration.csproj +++ b/src/Subjects/Specs.Integration/Specs.Integration.csproj @@ -9,11 +9,6 @@ enable - - - - - @@ -39,36 +34,29 @@ - + true %(Filename) true true - - UpdateBusinessCommand.feature - - + GetBusinessesByKey.feature - + GetBusinessesByName.feature - + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) - - $(UsingMicrosoftNETSdk) - %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) - - + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) - + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) diff --git a/src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommand.feature b/src/Subjects/Specs.Unit/Business/AddBusinessCommand.feature similarity index 100% rename from src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommand.feature rename to src/Subjects/Specs.Unit/Business/AddBusinessCommand.feature diff --git a/src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommand.feature.cs b/src/Subjects/Specs.Unit/Business/AddBusinessCommand.feature.cs similarity index 96% rename from src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommand.feature.cs rename to src/Subjects/Specs.Unit/Business/AddBusinessCommand.feature.cs index 782c675b..b2d06f51 100644 --- a/src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommand.feature.cs +++ b/src/Subjects/Specs.Unit/Business/AddBusinessCommand.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Unit.Business.Commands +namespace Goodtocode.Subjects.Unit.Business { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class AddBusinessCommandFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands", "Add Business Command", "As an customer service agent\r\nWhen I add business information\r\nThe business is sa" + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Add Business Command", "As an customer service agent\r\nWhen I add business information\r\nThe business is sa" + "ved in system of record", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } diff --git a/src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/AddBusinessCommandStepDefinitions.cs similarity index 98% rename from src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/AddBusinessCommandStepDefinitions.cs index 8ebd6f17..3b5b7cf4 100644 --- a/src/Subjects/Specs.Unit/Business/Commands/AddBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs.Unit/Business/AddBusinessCommandStepDefinitions.cs @@ -6,7 +6,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Unit.Common.ResponseTypes; -namespace Goodtocode.Subjects.Unit.Business.Commands; +namespace Goodtocode.Subjects.Unit.Business; [Binding] [Scope(Tag = "addBusinessCommand")] diff --git a/src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommand.feature b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature similarity index 100% rename from src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommand.feature rename to src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature diff --git a/src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature.cs similarity index 96% rename from src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommand.feature.cs rename to src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature.cs index 8424f2bf..610fa330 100644 --- a/src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommand.feature.cs +++ b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Unit.Business.Commands +namespace Goodtocode.Subjects.Unit.Business { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class DeleteBusinessCommandFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands", "Delete Business Command", "As an customer service agent\r\nI delete the business\r\nThe business is deleted from" + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Delete Business Command", "As an customer service agent\r\nI delete the business\r\nThe business is deleted from" + " the system of record", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } diff --git a/src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommandStepDefinitions.cs similarity index 98% rename from src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/DeleteBusinessCommandStepDefinitions.cs index 4f5413b7..45f3976b 100644 --- a/src/Subjects/Specs.Unit/Business/Commands/DeleteBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommandStepDefinitions.cs @@ -6,7 +6,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Unit.Common.ResponseTypes; -namespace Goodtocode.Subjects.Unit.Business.Commands; +namespace Goodtocode.Subjects.Unit.Business; [Binding] [Scope(Tag = "deleteBusinessCommand")] diff --git a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKey.feature b/src/Subjects/Specs.Unit/Business/GetBusinessesByKey.feature similarity index 100% rename from src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKey.feature rename to src/Subjects/Specs.Unit/Business/GetBusinessesByKey.feature diff --git a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKey.feature.cs b/src/Subjects/Specs.Unit/Business/GetBusinessesByKey.feature.cs similarity index 96% rename from src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKey.feature.cs rename to src/Subjects/Specs.Unit/Business/GetBusinessesByKey.feature.cs index ad90e0ec..920c5a6f 100644 --- a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByKey.feature.cs +++ b/src/Subjects/Specs.Unit/Business/GetBusinessesByKey.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Integration.Business.Queries +namespace Goodtocode.Subjects.Unit.Business { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class FindBusinessesByKeyFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Queries", "Find Businesses by key", "\tAs a customer service rep\r\n\tWhen I search for a business by key critera\r\n\tI can " + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Find Businesses by key", "\tAs a customer service rep\r\n\tWhen I search for a business by key critera\r\n\tI can " + "see a exact match for a business", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } diff --git a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKeyStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/GetBusinessesByKeyStepDefinitions.cs similarity index 98% rename from src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKeyStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/GetBusinessesByKeyStepDefinitions.cs index f1f7beaa..bd623e2a 100644 --- a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByKeyStepDefinitions.cs +++ b/src/Subjects/Specs.Unit/Business/GetBusinessesByKeyStepDefinitions.cs @@ -7,7 +7,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Unit.Common.ResponseTypes; -namespace Goodtocode.Subjects.Unit.Business.Queries; +namespace Goodtocode.Subjects.Unit.Business; [Binding] [Scope(Tag = "getBusinessesByKey")] diff --git a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByName.feature b/src/Subjects/Specs.Unit/Business/GetBusinessesByName.feature similarity index 100% rename from src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByName.feature rename to src/Subjects/Specs.Unit/Business/GetBusinessesByName.feature diff --git a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByName.feature.cs b/src/Subjects/Specs.Unit/Business/GetBusinessesByName.feature.cs similarity index 96% rename from src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByName.feature.cs rename to src/Subjects/Specs.Unit/Business/GetBusinessesByName.feature.cs index b33c646d..5abc1509 100644 --- a/src/Subjects/Specs.Integration/Business/Queries/GetBusinessesByName.feature.cs +++ b/src/Subjects/Specs.Unit/Business/GetBusinessesByName.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Integration.Business.Queries +namespace Goodtocode.Subjects.Unit.Business { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class FindBusinessesByNameFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Queries", "Find Businesses by name", "\tAs a customer service rep\r\n\tWhen I search for a business by name critera\r\n\tI can" + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Find Businesses by name", "\tAs a customer service rep\r\n\tWhen I search for a business by name critera\r\n\tI can" + " see a list of businesses that match the name criteria", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } diff --git a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByNameStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/GetBusinessesByNameStepDefinitions.cs similarity index 97% rename from src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByNameStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/GetBusinessesByNameStepDefinitions.cs index 8385cc8b..884f6628 100644 --- a/src/Subjects/Specs.Unit/Business/Queries/GetBusinessesByNameStepDefinitions.cs +++ b/src/Subjects/Specs.Unit/Business/GetBusinessesByNameStepDefinitions.cs @@ -7,7 +7,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Unit.Common.ResponseTypes; -namespace Goodtocode.Subjects.Unit.Business.Queries; +namespace Goodtocode.Subjects.Unit.Business; [Binding] [Scope(Tag = "getBusinessesByName")] @@ -18,7 +18,7 @@ public class GetBusinessesByNameStepDefinitions : TestBase private List _response = new(); private CommandResponseType _responseType; private ValidationResult _validationErrors = new(); - private string _businessName = String.Empty; + private string _businessName = string.Empty; private bool _businessExists; [Given(@"I have a def ""([^""]*)""")] diff --git a/src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommand.feature b/src/Subjects/Specs.Unit/Business/UpdateBusinessCommand.feature similarity index 100% rename from src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommand.feature rename to src/Subjects/Specs.Unit/Business/UpdateBusinessCommand.feature diff --git a/src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommand.feature.cs b/src/Subjects/Specs.Unit/Business/UpdateBusinessCommand.feature.cs similarity index 96% rename from src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommand.feature.cs rename to src/Subjects/Specs.Unit/Business/UpdateBusinessCommand.feature.cs index 10d6d898..37c0f5b4 100644 --- a/src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommand.feature.cs +++ b/src/Subjects/Specs.Unit/Business/UpdateBusinessCommand.feature.cs @@ -10,7 +10,7 @@ // ------------------------------------------------------------------------------ #region Designer generated code #pragma warning disable -namespace Goodtocode.Subjects.Unit.Business.Commands +namespace Goodtocode.Subjects.Unit.Business { using TechTalk.SpecFlow; using System; @@ -37,7 +37,7 @@ public partial class UpdateBusinessCommandFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business/Commands", "Update Business Command", "As an customer service agent\r\nI can change business information\r\nAnd get the syst" + + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Update Business Command", "As an customer service agent\r\nI can change business information\r\nAnd get the syst" + "em of record updated", ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } diff --git a/src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/UpdateBusinessCommandStepDefinitions.cs similarity index 98% rename from src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs rename to src/Subjects/Specs.Unit/Business/UpdateBusinessCommandStepDefinitions.cs index a3860261..3b73086e 100644 --- a/src/Subjects/Specs.Unit/Business/Commands/UpdateBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs.Unit/Business/UpdateBusinessCommandStepDefinitions.cs @@ -6,7 +6,7 @@ using System.Collections.Concurrent; using static Goodtocode.Subjects.Unit.Common.ResponseTypes; -namespace Goodtocode.Subjects.Unit.Business.Commands; +namespace Goodtocode.Subjects.Unit.Business; [Binding] [Scope(Tag = "updateBusinessCommand")] diff --git a/src/Subjects/Specs.Unit/Specs.Unit.csproj b/src/Subjects/Specs.Unit/Specs.Unit.csproj index ac696e29..549e1013 100644 --- a/src/Subjects/Specs.Unit/Specs.Unit.csproj +++ b/src/Subjects/Specs.Unit/Specs.Unit.csproj @@ -9,12 +9,6 @@ enable false - - - - - - @@ -36,40 +30,40 @@ - + AddBusinessCommand.feature - + DeleteBusinessCommand.feature - + UpdateBusinessCommand.feature - + GetBusinessesByKey.feature - + GetBusinessesByName.feature - + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) - + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) - + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) - + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) - + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) From 0fbeae54faa971ea1dbcc796e90a6638545085cd Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 16:06:44 -0700 Subject: [PATCH 12/26] AddBusiness integration added --- .../Business/AddBusinessCommand.feature | 19 +++ .../Business/AddBusinessCommand.feature.cs | 128 ++++++++++++++++++ .../AddBusinessCommandStepDefinitions.cs | 113 ++++++++++++++++ .../GetBusinessesByKeyStepDefinitions.cs | 2 +- .../Specs.Integration.csproj | 11 ++ src/Subjects/Specs.Integration/TestBase.cs | 13 +- 6 files changed, 278 insertions(+), 8 deletions(-) create mode 100644 src/Subjects/Specs.Integration/Business/AddBusinessCommand.feature create mode 100644 src/Subjects/Specs.Integration/Business/AddBusinessCommand.feature.cs create mode 100644 src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs diff --git a/src/Subjects/Specs.Integration/Business/AddBusinessCommand.feature b/src/Subjects/Specs.Integration/Business/AddBusinessCommand.feature new file mode 100644 index 00000000..8d155f3a --- /dev/null +++ b/src/Subjects/Specs.Integration/Business/AddBusinessCommand.feature @@ -0,0 +1,19 @@ +@addBusinessCommand +Feature: Add Business Command +As an customer service agent +When I add business information +The business is saved in system of record + +Scenario: Add business + Given I have a def "" + And I have a BusinessName "" + And I have a TaxNumber "" + When I add the business + Then The response is "" + And If the response has validation issues I see the "" in the response + +Examples: + | def | response | responseErrors | requestBusinessName | requestTaxNumber | + | success TaxNumber Add | Success | | businessName | 123-4567 | + | success Name Add | Success | | businessName | 123-4567 | + | bad request Missing BusinessName | BadRequest | BusinessName | | 123-4567 | \ No newline at end of file diff --git a/src/Subjects/Specs.Integration/Business/AddBusinessCommand.feature.cs b/src/Subjects/Specs.Integration/Business/AddBusinessCommand.feature.cs new file mode 100644 index 00000000..c6ab65d7 --- /dev/null +++ b/src/Subjects/Specs.Integration/Business/AddBusinessCommand.feature.cs @@ -0,0 +1,128 @@ +// ------------------------------------------------------------------------------ +// +// This code was generated by SpecFlow (https://www.specflow.org/). +// SpecFlow Version:3.9.0.0 +// SpecFlow Generator Version:3.9.0.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ +#region Designer generated code +#pragma warning disable +namespace Goodtocode.Subjects.Integration.Business +{ + using TechTalk.SpecFlow; + using System; + using System.Linq; + + + [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.9.0.0")] + [System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [NUnit.Framework.TestFixtureAttribute()] + [NUnit.Framework.DescriptionAttribute("Add Business Command")] + [NUnit.Framework.CategoryAttribute("addBusinessCommand")] + public partial class AddBusinessCommandFeature + { + + private TechTalk.SpecFlow.ITestRunner testRunner; + + private static string[] featureTags = new string[] { + "addBusinessCommand"}; + +#line 1 "AddBusinessCommand.feature" +#line hidden + + [NUnit.Framework.OneTimeSetUpAttribute()] + public virtual void FeatureSetup() + { + testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Business", "Add Business Command", "As an customer service agent\r\nWhen I add business information\r\nThe business is sa" + + "ved in system of record", ProgrammingLanguage.CSharp, featureTags); + testRunner.OnFeatureStart(featureInfo); + } + + [NUnit.Framework.OneTimeTearDownAttribute()] + public virtual void FeatureTearDown() + { + testRunner.OnFeatureEnd(); + testRunner = null; + } + + [NUnit.Framework.SetUpAttribute()] + public void TestInitialize() + { + } + + [NUnit.Framework.TearDownAttribute()] + public void TestTearDown() + { + testRunner.OnScenarioEnd(); + } + + public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + { + testRunner.OnScenarioInitialize(scenarioInfo); + testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); + } + + public void ScenarioStart() + { + testRunner.OnScenarioStart(); + } + + public void ScenarioCleanup() + { + testRunner.CollectScenarioErrors(); + } + + [NUnit.Framework.TestAttribute()] + [NUnit.Framework.DescriptionAttribute("Add business")] + [NUnit.Framework.TestCaseAttribute("success TaxNumber Add", "Success", "", "businessName", "123-4567", null)] + [NUnit.Framework.TestCaseAttribute("success Name Add", "Success", "", "businessName", "123-4567", null)] + [NUnit.Framework.TestCaseAttribute("bad request Missing BusinessName", "BadRequest", "BusinessName", "", "123-4567", null)] + public void AddBusiness(string def, string response, string responseErrors, string requestBusinessName, string requestTaxNumber, string[] exampleTags) + { + string[] tagsOfScenario = exampleTags; + System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); + argumentsOfScenario.Add("def", def); + argumentsOfScenario.Add("response", response); + argumentsOfScenario.Add("responseErrors", responseErrors); + argumentsOfScenario.Add("requestBusinessName", requestBusinessName); + argumentsOfScenario.Add("requestTaxNumber", requestTaxNumber); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add business", null, tagsOfScenario, argumentsOfScenario, featureTags); +#line 7 +this.ScenarioInitialize(scenarioInfo); +#line hidden + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) + { + testRunner.SkipScenario(); + } + else + { + this.ScenarioStart(); +#line 8 + testRunner.Given(string.Format("I have a def \"{0}\"", def), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given "); +#line hidden +#line 9 + testRunner.And(string.Format("I have a BusinessName \"{0}\"", requestBusinessName), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 10 + testRunner.And(string.Format("I have a TaxNumber \"{0}\"", requestTaxNumber), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden +#line 11 + testRunner.When("I add the business", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); +#line hidden +#line 12 + testRunner.Then(string.Format("The response is \"{0}\"", response), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); +#line hidden +#line 13 + testRunner.And(string.Format("If the response has validation issues I see the \"{0}\" in the response", responseErrors), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); +#line hidden + } + this.ScenarioCleanup(); + } + } +} +#pragma warning restore +#endregion diff --git a/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs new file mode 100644 index 00000000..ffc9347b --- /dev/null +++ b/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs @@ -0,0 +1,113 @@ +using FluentValidation.Results; +using Goodtocode.Subjects.Application; +using Goodtocode.Subjects.Application.Business.Commands; +using Goodtocode.Subjects.Application.Common.Exceptions; +using Moq; +using System.Collections.Concurrent; +using static Goodtocode.Subjects.Integration.Common.ResponseTypes; + +namespace Goodtocode.Subjects.Integration.Business; + +[Binding] +[Scope(Tag = "addBusinessCommand")] +public class AddBusinessCommandStepDefinitions : TestBase +{ + private IDictionary _commandErrors = new ConcurrentDictionary(); + private string[]? _expectedInvalidFields; + private string _businessName = string.Empty; + private string _taxNumber = string.Empty; + private object _responseType = string.Empty; + private ValidationResult _validationErrors = new(); + + [Given(@"I have a def ""([^""]*)""")] + public void GivenIHaveADef(string def) + { + _def = def; + } + + [Given(@"I have a BusinessName ""([^""]*)""")] + public void GivenIHaveABusinessName(string businessName) + { + _businessName = businessName; + } + + [Given(@"I have a TaxNumber ""([^""]*)""")] + public void GivenIHaveATaxNumber(string taxNumber) + { + _taxNumber = taxNumber; + } + + [When(@"I add the business")] + public async Task WhenIAddTheBusiness() + { + var request = new AddBusinessCommand + { + BusinessName = _businessName, + TaxNumber = _taxNumber + }; + + var requestValidator = new AddBusinessCommandValidator(); + + _validationErrors = await requestValidator.ValidateAsync(request); + + if (_validationErrors.IsValid) + try + { + var handler = new AddBusinessCommandHandler(base.BusinessRepo); + await handler.Handle(request, CancellationToken.None); + _responseType = CommandResponseType.Successful; + } + catch (Exception e) + { + switch (e) + { + case ValidationException validationException: + _commandErrors = validationException.Errors; + _responseType = CommandResponseType.BadRequest; + break; + case ConflictException conflictException: + _responseType = CommandResponseType.Conflict; + break; + default: + _responseType = CommandResponseType.Error; + break; + } + } + else + _responseType = CommandResponseType.BadRequest; + } + + [Then(@"The response is ""([^""]*)""")] + public void ThenTheResponseIs(string response) + { + switch (response) + { + case "Success": + _responseType.Should().Be(CommandResponseType.Successful); + break; + case "BadRequest": + _responseType.Should().Be(CommandResponseType.BadRequest); + break; + case "Conflict": + _responseType.Should().Be(CommandResponseType.Conflict); + break; + } + } + + [Then(@"If the response has validation issues I see the ""([^""]*)"" in the response")] + public void ThenIfTheResponseHasValidationIssuesISeeTheInTheResponse(string expectedInvalidFields) + { + if (string.IsNullOrWhiteSpace(expectedInvalidFields)) return; + + _expectedInvalidFields = expectedInvalidFields.Split(","); + + foreach (var field in _expectedInvalidFields) + { + var hasCommandValidatorErrors = _validationErrors.Errors.Any(x => x.PropertyName == field.Trim()); + var hasCommandErrors = _commandErrors.Any(x => x.Key == field.Trim()); + var hasErrorMatch = hasCommandErrors || hasCommandValidatorErrors; + + hasErrorMatch.Should().BeTrue(); + } + } +} \ No newline at end of file diff --git a/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs index 9443a4ce..83ba09ae 100644 --- a/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs @@ -54,7 +54,7 @@ public async Task WhenIQueryForMatchingBusinesses() try { var handler = new GetBusinessQueryHandler(BusinessRepo, Mapper); - _response = await handler.Handle(request, CancellationToken.None); + _response = await handler.Handle(request, CancellationToken.None) ?? new BusinessEntity(); _responseType = CommandResponseType.Successful; } catch (Exception e) diff --git a/src/Subjects/Specs.Integration/Specs.Integration.csproj b/src/Subjects/Specs.Integration/Specs.Integration.csproj index 3d31b46d..fad46ea3 100644 --- a/src/Subjects/Specs.Integration/Specs.Integration.csproj +++ b/src/Subjects/Specs.Integration/Specs.Integration.csproj @@ -9,6 +9,10 @@ enable + + + + @@ -34,6 +38,9 @@ + + %(Filename) + true %(Filename) @@ -48,6 +55,10 @@ + + $(UsingMicrosoftNETSdk) + %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) + $(UsingMicrosoftNETSdk) %(RelativeDir)%(Filename).feature$(DefaultLanguageSourceExtension) diff --git a/src/Subjects/Specs.Integration/TestBase.cs b/src/Subjects/Specs.Integration/TestBase.cs index 15f1b859..ee7204b0 100644 --- a/src/Subjects/Specs.Integration/TestBase.cs +++ b/src/Subjects/Specs.Integration/TestBase.cs @@ -4,6 +4,7 @@ using Goodtocode.Subjects.Integration.Common; using Goodtocode.Subjects.Persistence; using Goodtocode.Subjects.Persistence.Contexts; +using Goodtocode.Subjects.Persistence.Repositories; namespace Goodtocode.Application.Integration; @@ -14,18 +15,16 @@ public class TestBase private static IConfigurationRoot _configuration = null!; private static IServiceScopeFactory _scopeFactory = null!; + public IMapper Mapper { get; } + public IBusinessRepo BusinessRepo { get; private set; } + public TestBase() { Mapper = new MapperConfiguration(cfg => { cfg.AddProfile(); }) .CreateMapper(); - RunBeforeAnyTests(); } - public IMapper Mapper { get; } - - public IBusinessRepo? BusinessRepo { get; private set; } - [OneTimeSetUp] public void RunBeforeAnyTests() { @@ -50,8 +49,8 @@ public void RunBeforeAnyTests() _scopeFactory = services.BuildServiceProvider().GetRequiredService(); var sp = services.BuildServiceProvider(); - BusinessRepo = sp.GetRequiredService(); - + BusinessRepo = sp.GetRequiredService() ?? new Mock().Object; + SeedContext(); } From 1edac5c65039f5a006cd4c7ecc120987dfc14bae Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 16:12:41 -0700 Subject: [PATCH 13/26] Fixed delete signature --- .../Controllers/BusinessController.cs | 8 +++----- .../Goodtocode.Subjects.WebApi.xml | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Subjects/Presentation.Api.WebApi/Controllers/BusinessController.cs b/src/Subjects/Presentation.Api.WebApi/Controllers/BusinessController.cs index 2dd5b0d6..068e213d 100644 --- a/src/Subjects/Presentation.Api.WebApi/Controllers/BusinessController.cs +++ b/src/Subjects/Presentation.Api.WebApi/Controllers/BusinessController.cs @@ -58,7 +58,7 @@ public async Task Get(Guid key) /// /// Sample request: /// "api-version": 1 - /// HttpPost Body + /// HttpPut Body /// { /// "BusinessName": "My Business", /// "TaxNumber": "12-445666" @@ -112,14 +112,12 @@ public async Task Post(Guid businessKey, [FromBody] BusinessObject /// Sample request: /// "BusinessKey": d3d42e6e-87c5-49d6-aec0-7995711d6612, /// "api-version": 1 - /// HttpPost Body + /// HttpDelete Body /// { - /// "BusinessName": "My Business", - /// "TaxNumber": "12-445666" /// } /// /// bool - [HttpPost(Name = "UpdateBusinessCommand")] + [HttpDelete(Name = "DeleteBusinessCommand")] [ProducesResponseType(StatusCodes.Status204NoContent)] [ProducesResponseType(StatusCodes.Status404NotFound)] public async Task Delete(Guid businessKey) diff --git a/src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml b/src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml index d4ed8425..2c58224a 100644 --- a/src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml +++ b/src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml @@ -77,7 +77,7 @@ Sample request: "api-version": 1 - HttpPost Body + HttpPut Body { "BusinessName": "My Business", "TaxNumber": "12-445666" @@ -109,10 +109,8 @@ Sample request: "BusinessKey": d3d42e6e-87c5-49d6-aec0-7995711d6612, "api-version": 1 - HttpPost Body + HttpDelete Body { - "BusinessName": "My Business", - "TaxNumber": "12-445666" } bool From decb2fe4a5221e9e3a254dd2953dad39d8ebb02c Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 16:22:36 -0700 Subject: [PATCH 14/26] Resolved some warnings --- .../Infrastructure.Persistence/Repositories/BusinessRepo.cs | 4 ++-- .../Business/AddBusinessCommandStepDefinitions.cs | 2 +- .../Specs.Integration/Business/GetBusinessesByKey.feature | 1 + .../Specs.Integration/Business/GetBusinessesByKey.feature.cs | 1 + .../Business/GetBusinessesByKeyStepDefinitions.cs | 2 +- src/Subjects/Specs.Integration/TestBase.cs | 3 ++- .../Specs.Unit/Business/AddBusinessCommandStepDefinitions.cs | 2 +- .../Specs.Unit/Business/DeleteBusinessCommand.feature | 3 +-- .../Specs.Unit/Business/DeleteBusinessCommand.feature.cs | 1 - .../Business/DeleteBusinessCommandStepDefinitions.cs | 4 ++-- 10 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Subjects/Infrastructure.Persistence/Repositories/BusinessRepo.cs b/src/Subjects/Infrastructure.Persistence/Repositories/BusinessRepo.cs index 6873b5f8..226c8263 100644 --- a/src/Subjects/Infrastructure.Persistence/Repositories/BusinessRepo.cs +++ b/src/Subjects/Infrastructure.Persistence/Repositories/BusinessRepo.cs @@ -65,7 +65,7 @@ public async Task UpdateBusinessAsync(IBusinessEntity businessInfo, Canc return Result.Failure("Cannot update. Business not found."); businessResult.BusinessName = businessInfo.BusinessName; businessResult.TaxNumber = businessInfo.TaxNumber; - var result = await _context.SaveChangesAsync(cancellationToken); + await _context.SaveChangesAsync(cancellationToken); return Result.Success(); } @@ -75,7 +75,7 @@ public async Task DeleteBusinessAsync(Guid businessKey, CancellationToke if (businessResult == null) return Result.Failure("Cannot delete. Business not found."); _context.Business.Remove(businessResult); - var result = await _context.SaveChangesAsync(cancellationToken); + await _context.SaveChangesAsync(cancellationToken); return Result.Success(); } } \ No newline at end of file diff --git a/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs index ffc9347b..9c6cbbeb 100644 --- a/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs @@ -65,7 +65,7 @@ public async Task WhenIAddTheBusiness() _commandErrors = validationException.Errors; _responseType = CommandResponseType.BadRequest; break; - case ConflictException conflictException: + case ConflictException: _responseType = CommandResponseType.Conflict; break; default: diff --git a/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature index ab511f03..5c920fb5 100644 --- a/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature @@ -17,4 +17,5 @@ Scenario: Get Existing Business By Name Examples: | def | response | responseErrors | businessKey | businessExists | | success exists | Success | | 2016a497-e56c-4be8-8ef6-3dc5ae1699ce | true | + | Business NotFound | NotFound | | 1234a497-1234-1234-8ef6-3dc5ae1699ce | false | | empty key | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | false | \ No newline at end of file diff --git a/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs index f96856ab..86d8cf5c 100644 --- a/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs @@ -79,6 +79,7 @@ public void ScenarioCleanup() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Get Existing Business By Name")] [NUnit.Framework.TestCaseAttribute("success exists", "Success", "", "2016a497-e56c-4be8-8ef6-3dc5ae1699ce", "true", null)] + [NUnit.Framework.TestCaseAttribute("Business NotFound", "NotFound", "", "1234a497-1234-1234-8ef6-3dc5ae1699ce", "false", null)] [NUnit.Framework.TestCaseAttribute("empty key", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", "false", null)] public void GetExistingBusinessByName(string def, string response, string responseErrors, string businessKey, string businessExists, string[] exampleTags) { diff --git a/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs index 83ba09ae..d4ff1814 100644 --- a/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs @@ -65,7 +65,7 @@ public async Task WhenIQueryForMatchingBusinesses() _commandErrors = validationException.Errors; _responseType = CommandResponseType.BadRequest; break; - case NotFoundException notFoundException: + case NotFoundException: _responseType = CommandResponseType.NotFound; break; default: diff --git a/src/Subjects/Specs.Integration/TestBase.cs b/src/Subjects/Specs.Integration/TestBase.cs index ee7204b0..9845a4b4 100644 --- a/src/Subjects/Specs.Integration/TestBase.cs +++ b/src/Subjects/Specs.Integration/TestBase.cs @@ -23,6 +23,7 @@ public TestBase() Mapper = new MapperConfiguration(cfg => { cfg.AddProfile(); }) .CreateMapper(); RunBeforeAnyTests(); + BusinessRepo ??= new Mock().Object; } [OneTimeSetUp] @@ -49,7 +50,7 @@ public void RunBeforeAnyTests() _scopeFactory = services.BuildServiceProvider().GetRequiredService(); var sp = services.BuildServiceProvider(); - BusinessRepo = sp.GetRequiredService() ?? new Mock().Object; + BusinessRepo = sp.GetRequiredService(); SeedContext(); } diff --git a/src/Subjects/Specs.Unit/Business/AddBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/AddBusinessCommandStepDefinitions.cs index 3b5b7cf4..8500ca33 100644 --- a/src/Subjects/Specs.Unit/Business/AddBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs.Unit/Business/AddBusinessCommandStepDefinitions.cs @@ -67,7 +67,7 @@ public async Task WhenIAddTheBusiness() _commandErrors = validationException.Errors; _responseType = CommandResponseType.BadRequest; break; - case ConflictException conflictException: + case ConflictException: _responseType = CommandResponseType.Conflict; break; default: diff --git a/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature index 8788d922..846777ec 100644 --- a/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature +++ b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature @@ -14,5 +14,4 @@ Scenario: Delete business Examples: | def | response | responseErrors | requestBusinessKey | | success TaxNumber BusinessKey | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | - | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | - | bad request non-guid BusinessKey | BadRequest | BusinessKey | 11111 | \ No newline at end of file + | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | \ No newline at end of file diff --git a/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature.cs b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature.cs index 610fa330..1c1e19f9 100644 --- a/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature.cs +++ b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature.cs @@ -80,7 +80,6 @@ public void ScenarioCleanup() [NUnit.Framework.DescriptionAttribute("Delete business")] [NUnit.Framework.TestCaseAttribute("success TaxNumber BusinessKey", "Success", "", "d1604a05-f883-40f1-803b-8562b5674f1a", null)] [NUnit.Framework.TestCaseAttribute("bad request Empty BusinessKey", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", null)] - [NUnit.Framework.TestCaseAttribute("bad request non-guid BusinessKey", "BadRequest", "BusinessKey", "11111", null)] public void DeleteBusiness(string def, string response, string responseErrors, string requestBusinessKey, string[] exampleTags) { string[] tagsOfScenario = exampleTags; diff --git a/src/Subjects/Specs.Unit/Business/DeleteBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommandStepDefinitions.cs index 45f3976b..710d86aa 100644 --- a/src/Subjects/Specs.Unit/Business/DeleteBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommandStepDefinitions.cs @@ -27,7 +27,7 @@ public void GivenIHaveADef(string def) [Given(@"I have a BusinessKey ""([^""]*)""")] public void GivenIHaveABusinessKey(string businessKey) { - Guid.TryParse(businessKey, out _businessKey); + _businessKey = Guid.Parse(businessKey); } [When(@"I delete the business")] @@ -59,7 +59,7 @@ public async Task WhenIDeleteTheBusiness() _commandErrors = validationException.Errors; _responseType = CommandResponseType.BadRequest; break; - case NotFoundException notFoundException: + case NotFoundException: _responseType = CommandResponseType.NotFound; break; default: From 5dec8e86c7e907a26c1f9d1b74305fa6fc1ac505 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 16:26:36 -0700 Subject: [PATCH 15/26] Fixed paths that were flattened to root --- .github/workflows/gtc-rg-subjects-api.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gtc-rg-subjects-api.yml b/.github/workflows/gtc-rg-subjects-api.yml index ee51b00b..50d253bd 100644 --- a/.github/workflows/gtc-rg-subjects-api.yml +++ b/.github/workflows/gtc-rg-subjects-api.yml @@ -44,13 +44,15 @@ jobs: RUNTIME_ENV: 'Development' SRC_PATH: './src/Subjects' SRC_SLN: 'Goodtocode.Subjects.sln' - API_PATH: 'Presentation/Api.WebApi' - API_PROJECT: 'Api.WebApi.csproj' + API_PATH: 'Presentation.Api.WebApi' + API_PROJECT: 'Presentation.Api.WebApi.csproj' APPI_NAME: 'appi-subjects-dev-001' - INFRA_PATH: 'Infrastructure/Persistence' - INFRA_PROJECT: 'Persistence.csproj' - UNIT_PATH: 'Specs/Application.Unit' - UNIT_PROJECT: 'Application.Unit.csproj' + INFRA_PATH: 'Infrastructure.Persistence' + INFRA_PROJECT: 'Infrastructure.Persistence.csproj' + INTEGRATION_PATH: 'Specs.Integration' + INTEGRATION_PROJECT: 'Specs.Integration.csproj' + UNIT_PATH: 'Specs.Unit' + UNIT_PROJECT: 'Specs.Unit.csproj' SCRIPTS_PATH: './.github/scripts' SQL_NAME: 'sql-entities-dev-001' SQLDB_NAME: 'sqldb-entities-dev-001' @@ -76,6 +78,7 @@ jobs: run: | dotnet build ${{ env.SRC_PATH }}/${{ env.SRC_SLN }} --configuration Release dotnet test ${{ env.SRC_PATH }}/${{ env.UNIT_PATH }}/${{ env.UNIT_PROJECT }} --verbosity normal + dotnet test ${{ env.SRC_PATH }}/${{ env.INTEGRATION_PATH }}/${{ env.INTEGRATION_PROJECT }} --verbosity normal dotnet publish ${{ env.SRC_PATH }}/${{ env.API_PATH }}/${{ env.API_PROJECT }} --configuration Release -o ${{ env.AZURE_WEBAPP_NAME }} shell: pwsh From f61b17793b402dc8a00a4879923bf36ea8370585 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 16:56:56 -0700 Subject: [PATCH 16/26] Removed all test warnings --- .../Data/BusinessService.cs | 48 ++++++++++++++----- .../AddBusinessCommandStepDefinitions.cs | 2 +- .../Business/GetBusinessesByKey.feature | 9 ++-- .../Business/GetBusinessesByKey.feature.cs | 20 ++++---- .../GetBusinessesByKeyStepDefinitions.cs | 9 +--- .../GetBusinessesByNameStepDefinitions.cs | 11 +---- .../Business/DeleteBusinessCommand.feature | 6 +-- .../GetBusinessesByKeyStepDefinitions.cs | 2 +- 8 files changed, 56 insertions(+), 51 deletions(-) diff --git a/src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs b/src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs index a86b12ff..06b16253 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs +++ b/src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs @@ -1,5 +1,8 @@ +using Goodtocode.Common.Extensions; +using Goodtocode.Subjects.Application; using Goodtocode.Subjects.BlazorServer.Pages.Business; using Goodtocode.Subjects.Domain; +using Microsoft.EntityFrameworkCore.Metadata.Internal; using System.Net; using System.Text.Json; @@ -7,17 +10,17 @@ namespace Goodtocode.Subjects.BlazorServer.Data; public class BusinessService { - private IHttpClientFactory _clientFactory; + private readonly IHttpClientFactory _clientFactory; public BusinessService(IHttpClientFactory clientFactory) { _clientFactory = clientFactory; } - public async Task GetBusinessAsync(Guid key) + public async Task GetBusinessAsync(Guid businessKey) { var httpClient = _clientFactory.CreateClient("SubjectsApiClient"); - var response = await httpClient.GetAsync($"{httpClient.BaseAddress}/Business?key={key}&api-version=1"); + var response = await httpClient.GetAsync($"{httpClient.BaseAddress}/Business?key={businessKey}&api-version=1"); var business = new BusinessEntity(); if (response.StatusCode != HttpStatusCode.NotFound) { @@ -37,27 +40,50 @@ public async Task> GetBusinessesAsync(string name) if (response.StatusCode != HttpStatusCode.NotFound) { response.EnsureSuccessStatusCode(); - business = JsonSerializer.Deserialize>(response.Content.ReadAsStream()); - if (business == null) - throw new Exception(); + business = JsonSerializer.Deserialize>(response.Content.ReadAsStream()) ?? throw new Exception("Deserialization failed."); } + return business; } public async Task CreateBusinessAsync(BusinessObject business) { - BusinessEntity? businessCreated = null; + BusinessEntity? businessCreated = new(); var httpClient = _clientFactory.CreateClient("SubjectsApiClient"); var response = await httpClient.PutAsJsonAsync($"{httpClient.BaseAddress}/Business?api-version=1", business); if (response.StatusCode == HttpStatusCode.Created) - businessCreated = JsonSerializer.Deserialize(await response.Content.ReadAsStreamAsync()); - - if (businessCreated == null) - throw new Exception(); + businessCreated = JsonSerializer.Deserialize(await response.Content.ReadAsStreamAsync()) ?? throw new Exception("Deserialization failed."); response.EnsureSuccessStatusCode(); return businessCreated; } + + public async Task UpdateBusinessAsync(BusinessEntity business) + { + BusinessEntity? businessUpdated = null; + var httpClient = _clientFactory.CreateClient("SubjectsApiClient"); + var response = await httpClient.PostAsJsonAsync($"{httpClient.BaseAddress}/Business?key={business.BusinessKey}api-version=1", business.CopyPropertiesSafe()); + + if (response.StatusCode == HttpStatusCode.OK) + businessUpdated = JsonSerializer.Deserialize(await response.Content.ReadAsStreamAsync()); + if (businessUpdated == null) + throw new Exception(); + + response.EnsureSuccessStatusCode(); + + return businessUpdated; + } + + public async Task DeleteBusinessAsync(Guid businessKey) + { + BusinessEntity? businessUpdated = null; + var httpClient = _clientFactory.CreateClient("SubjectsApiClient"); + var response = await httpClient.DeleteAsync($"{httpClient.BaseAddress}/Business?key={businessKey}api-version=1"); + + response.EnsureSuccessStatusCode(); + + return businessUpdated; + } } \ No newline at end of file diff --git a/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs index 9c6cbbeb..2192a4fc 100644 --- a/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/AddBusinessCommandStepDefinitions.cs @@ -53,7 +53,7 @@ public async Task WhenIAddTheBusiness() if (_validationErrors.IsValid) try { - var handler = new AddBusinessCommandHandler(base.BusinessRepo); + var handler = new AddBusinessCommandHandler(BusinessRepo); await handler.Handle(request, CancellationToken.None); _responseType = CommandResponseType.Successful; } diff --git a/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature index 5c920fb5..038af5cd 100644 --- a/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature @@ -7,7 +7,6 @@ Feature: Find Businesses by key Scenario: Get Existing Business By Name Given I have a def "" And I have a BusinessKey "" - And the business exists "" When I query for matching Businesses Then the response is "" And if the response has validation issues I see the "" in the response @@ -15,7 +14,7 @@ Scenario: Get Existing Business By Name And the business has a matching BusinessKey of "" Examples: - | def | response | responseErrors | businessKey | businessExists | - | success exists | Success | | 2016a497-e56c-4be8-8ef6-3dc5ae1699ce | true | - | Business NotFound | NotFound | | 1234a497-1234-1234-8ef6-3dc5ae1699ce | false | - | empty key | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | false | \ No newline at end of file + | def | response | responseErrors | businessKey | + | success exists | Success | | 2016a497-e56c-4be8-8ef6-3dc5ae1699ce | + | Business NotFound | NotFound | | 1234a497-1234-1234-8ef6-3dc5ae1699ce | + | empty key | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | \ No newline at end of file diff --git a/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs index 86d8cf5c..abeec259 100644 --- a/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByKey.feature.cs @@ -78,10 +78,10 @@ public void ScenarioCleanup() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Get Existing Business By Name")] - [NUnit.Framework.TestCaseAttribute("success exists", "Success", "", "2016a497-e56c-4be8-8ef6-3dc5ae1699ce", "true", null)] - [NUnit.Framework.TestCaseAttribute("Business NotFound", "NotFound", "", "1234a497-1234-1234-8ef6-3dc5ae1699ce", "false", null)] - [NUnit.Framework.TestCaseAttribute("empty key", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", "false", null)] - public void GetExistingBusinessByName(string def, string response, string responseErrors, string businessKey, string businessExists, string[] exampleTags) + [NUnit.Framework.TestCaseAttribute("success exists", "Success", "", "2016a497-e56c-4be8-8ef6-3dc5ae1699ce", null)] + [NUnit.Framework.TestCaseAttribute("Business NotFound", "NotFound", "", "1234a497-1234-1234-8ef6-3dc5ae1699ce", null)] + [NUnit.Framework.TestCaseAttribute("empty key", "BadRequest", "BusinessKey", "00000000-0000-0000-0000-000000000000", null)] + public void GetExistingBusinessByName(string def, string response, string responseErrors, string businessKey, string[] exampleTags) { string[] tagsOfScenario = exampleTags; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); @@ -89,7 +89,6 @@ public void GetExistingBusinessByName(string def, string response, string respon argumentsOfScenario.Add("response", response); argumentsOfScenario.Add("responseErrors", responseErrors); argumentsOfScenario.Add("businessKey", businessKey); - argumentsOfScenario.Add("businessExists", businessExists); TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Get Existing Business By Name", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 7 this.ScenarioInitialize(scenarioInfo); @@ -108,21 +107,18 @@ public void GetExistingBusinessByName(string def, string response, string respon testRunner.And(string.Format("I have a BusinessKey \"{0}\"", businessKey), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden #line 10 - testRunner.And(string.Format("the business exists \"{0}\"", businessExists), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); -#line hidden -#line 11 testRunner.When("I query for matching Businesses", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When "); #line hidden -#line 12 +#line 11 testRunner.Then(string.Format("the response is \"{0}\"", response), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then "); #line hidden -#line 13 +#line 12 testRunner.And(string.Format("if the response has validation issues I see the \"{0}\" in the response", responseErrors), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden -#line 14 +#line 13 testRunner.And("if the response is valid then the response contains a business", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden -#line 15 +#line 14 testRunner.And(string.Format("the business has a matching BusinessKey of \"{0}\"", businessKey), ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And "); #line hidden } diff --git a/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs index d4ff1814..faffe73f 100644 --- a/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByKeyStepDefinitions.cs @@ -18,8 +18,7 @@ public class GetBusinessesByKeyStepDefinitions : TestBase private CommandResponseType _responseType; private ValidationResult _validationErrors = new(); private Guid _businessKey = Guid.Empty; - private bool _businessExists; - + [Given(@"I have a def ""([^""]*)""")] public void GivenIHaveADef(string def) { @@ -32,12 +31,6 @@ public void GivenIHaveABusinessName(Guid businessKey) _businessKey = businessKey; } - [Given(@"the business exists ""([^""]*)""")] - public void GivenTheBusinessExists(bool exists) - { - _businessExists = exists; - } - [When(@"I query for matching Businesses")] public async Task WhenIQueryForMatchingBusinesses() { diff --git a/src/Subjects/Specs.Integration/Business/GetBusinessesByNameStepDefinitions.cs b/src/Subjects/Specs.Integration/Business/GetBusinessesByNameStepDefinitions.cs index 0fe4e303..8af7fecd 100644 --- a/src/Subjects/Specs.Integration/Business/GetBusinessesByNameStepDefinitions.cs +++ b/src/Subjects/Specs.Integration/Business/GetBusinessesByNameStepDefinitions.cs @@ -18,7 +18,6 @@ public class GetBusinessesByNameStepDefinitions : TestBase private CommandResponseType _responseType; private ValidationResult _validationErrors = new(); private string _businessName = string.Empty; - private bool _businessExists; [Given(@"I have a def ""([^""]*)""")] public void GivenIHaveADef(string p0) @@ -32,17 +31,9 @@ public void GivenIHaveABusinessName(string businessInDb) _businessName = businessInDb; } - [Given(@"the business exists ""([^""]*)""")] - public void GivenTheBusinessExists(bool exists) - { - _businessExists = exists; - } - [When(@"I query for matching Businesses")] public async Task WhenIQueryForMatchingBusinesses() { - var userBusinessesRepoMock = new Mock(); - var request = new GetBusinessesByNameQuery { BusinessName = _businessName @@ -67,7 +58,7 @@ public async Task WhenIQueryForMatchingBusinesses() _commandErrors = validationException.Errors; _responseType = CommandResponseType.BadRequest; break; - case NotFoundException notFoundException: + case NotFoundException: _responseType = CommandResponseType.NotFound; break; default: diff --git a/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature index 846777ec..f1199eee 100644 --- a/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature +++ b/src/Subjects/Specs.Unit/Business/DeleteBusinessCommand.feature @@ -12,6 +12,6 @@ Scenario: Delete business And If the response has validation issues I see the "" in the response Examples: - | def | response | responseErrors | requestBusinessKey | - | success TaxNumber BusinessKey | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | - | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | \ No newline at end of file + | def | response | responseErrors | requestBusinessKey | + | success TaxNumber BusinessKey | Success | | d1604a05-f883-40f1-803b-8562b5674f1a | + | bad request Empty BusinessKey | BadRequest | BusinessKey | 00000000-0000-0000-0000-000000000000 | \ No newline at end of file diff --git a/src/Subjects/Specs.Unit/Business/GetBusinessesByKeyStepDefinitions.cs b/src/Subjects/Specs.Unit/Business/GetBusinessesByKeyStepDefinitions.cs index bd623e2a..a49926aa 100644 --- a/src/Subjects/Specs.Unit/Business/GetBusinessesByKeyStepDefinitions.cs +++ b/src/Subjects/Specs.Unit/Business/GetBusinessesByKeyStepDefinitions.cs @@ -68,7 +68,7 @@ public async Task WhenIQueryForMatchingBusinesses() try { var handler = new GetBusinessQueryHandler(userBusinessesRepoMock.Object, Mapper); - _response = await handler.Handle(request, CancellationToken.None); + _response = await handler.Handle(request, CancellationToken.None) ?? new BusinessEntity(); _responseType = CommandResponseType.Successful; } catch (Exception e) From 4622252efb88f1e17ae398a58f8323e9c5520798 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 17:12:54 -0700 Subject: [PATCH 17/26] Added form to BuzinessCreate --- .../Pages/Business/BusinessCreate.razor | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor index 856e1f36..8e8b8c81 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor +++ b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor @@ -9,9 +9,11 @@

Business Create

Create a businesses

- - - + + + + + @code { private string businessName = string.Empty; From b9f1e1aa38a87149098a25bd7ee1016684620049 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sun, 18 Jun 2023 21:03:49 -0700 Subject: [PATCH 18/26] Removing stock pages --- .../Data/WeatherForecast.cs | 13 ----- .../Data/WeatherForecastService.cs | 20 -------- .../Pages/Business/BusinessList.razor | 18 +++---- .../Pages/To-Delete/Counter.razor | 17 ------- .../Pages/To-Delete/FetchData.razor | 48 ------------------- .../Presentation.Web.BlazorServer/Program.cs | 3 +- .../Shared/NavMenu.razor | 15 ++---- .../appsettings.Development.json | 3 +- .../appsettings.json | 13 ----- 9 files changed, 17 insertions(+), 133 deletions(-) delete mode 100644 src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecast.cs delete mode 100644 src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecastService.cs delete mode 100644 src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/Counter.razor delete mode 100644 src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/FetchData.razor diff --git a/src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecast.cs b/src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecast.cs deleted file mode 100644 index f37dc94a..00000000 --- a/src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecast.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Goodtocode.Subjects.BlazorServer.Data -{ - public class WeatherForecast - { - public DateOnly Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string? Summary { get; set; } - } -} \ No newline at end of file diff --git a/src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecastService.cs b/src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecastService.cs deleted file mode 100644 index c505f651..00000000 --- a/src/Subjects/Presentation.Web.BlazorServer/Data/WeatherForecastService.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Goodtocode.Subjects.BlazorServer.Data -{ - public class WeatherForecastService - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - public Task GetForecastAsync(DateOnly startDate) - { - return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = startDate.AddDays(index), - TemperatureC = Random.Shared.Next(-20, 55), - Summary = Summaries[Random.Shared.Next(Summaries.Length)] - }).ToArray()); - } - } -} \ No newline at end of file diff --git a/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor index ddf0e523..ece51050 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor +++ b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor @@ -11,16 +11,12 @@

Search for businesses

- -@if (businesses == null) -{ -

Please search for a business...

-} -else if (businesses.Count() == 0) +@if (alertMessage.Length > 0) { - + } -else + +@if (businesses.Count() > 0) { @@ -44,11 +40,15 @@ else } @code { + private string alertMessage = string.Empty; private string businessName = string.Empty; private IEnumerable businesses = new List(); private async Task GetBusineses() { + alertMessage = string.Empty; businesses = await Service.GetBusinessesAsync(businessName); - } + if (businesses.Count() == 0) + alertMessage = "No businesses found"; + } } diff --git a/src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/Counter.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/Counter.razor deleted file mode 100644 index 7d7c801d..00000000 --- a/src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/Counter.razor +++ /dev/null @@ -1,17 +0,0 @@ -@page "/counter" - -Counter - -

Counter

- -

Current count: @currentCount

- - -@code { - private int currentCount = 0; - - private void IncrementCount() - { - currentCount++; - } -} diff --git a/src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/FetchData.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/FetchData.razor deleted file mode 100644 index 74297a2f..00000000 --- a/src/Subjects/Presentation.Web.BlazorServer/Pages/To-Delete/FetchData.razor +++ /dev/null @@ -1,48 +0,0 @@ -@page "/fetchdata" -@using Goodtocode.Subjects.BlazorServer.Data; - -@inject WeatherForecastService ForecastService - -Weather forecast - -

Weather forecast

- -

This component demonstrates fetching data from a service.

- -@if (forecasts == null) -{ -

Loading...

-} -else -{ -
- - - - - - - - - - @foreach (var forecast in forecasts) - { - - - - - - - } - -
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
-} - -@code { - private WeatherForecast[]? forecasts; - - protected override async Task OnInitializedAsync() - { - forecasts = await ForecastService.GetForecastAsync(DateOnly.FromDateTime(DateTime.Now)); - } -} diff --git a/src/Subjects/Presentation.Web.BlazorServer/Program.cs b/src/Subjects/Presentation.Web.BlazorServer/Program.cs index a9362219..1791a240 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/Program.cs +++ b/src/Subjects/Presentation.Web.BlazorServer/Program.cs @@ -40,12 +40,11 @@ builder.Services.AddApiClientServices("SubjectsApiClient", builder.Configuration["Subjects:Url"], new ClientCredentialSetting( builder.Configuration["Subjects:ClientId"], - builder.Configuration["SubjectsClientSecret"], + builder.Configuration["Subjects:ClientSecret"], builder.Configuration["Subjects:TokenUrl"], builder.Configuration["Subjects:Scope"]) ); -builder.Services.AddSingleton(); builder.Services.AddSingleton(); var app = builder.Build(); diff --git a/src/Subjects/Presentation.Web.BlazorServer/Shared/NavMenu.razor b/src/Subjects/Presentation.Web.BlazorServer/Shared/NavMenu.razor index 540f37f0..e28fca0d 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/Shared/NavMenu.razor +++ b/src/Subjects/Presentation.Web.BlazorServer/Shared/NavMenu.razor @@ -1,6 +1,6 @@ 
/// /// Sample request: - /// "BusinessKey": d3d42e6e-87c5-49d6-aec0-7995711d6612, + /// "BusinessKey": d3d42e6e-87c5-49d6-aec0-7995711d6612, /// "api-version": 1 /// HttpPost Body /// { diff --git a/src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml b/src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml index 2c58224a..9b27486d 100644 --- a/src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml +++ b/src/Subjects/Presentation.Api.WebApi/Goodtocode.Subjects.WebApi.xml @@ -91,7 +91,7 @@
Sample request: - "BusinessKey": d3d42e6e-87c5-49d6-aec0-7995711d6612, + "BusinessKey": d3d42e6e-87c5-49d6-aec0-7995711d6612, "api-version": 1 HttpPost Body { diff --git a/src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs b/src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs index 21067c00..3d920d04 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs +++ b/src/Subjects/Presentation.Web.BlazorServer/Data/BusinessService.cs @@ -47,7 +47,7 @@ public async Task> GetBusinessesAsync(string name) return business; } - public async Task CreateBusinessAsync(BusinessCreateModel business) + public async Task CreateBusinessAsync(BusinessObject business) { BusinessEntity? businessCreated = new(); var httpClient = _clientFactory.CreateClient("SubjectsApiClient"); diff --git a/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor index 94adf368..85d06c63 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor +++ b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessCreate.razor @@ -14,10 +14,12 @@ -
+
+
+
@@ -42,6 +44,7 @@ await Task.Delay(500, cts.Token); alertMessage = string.Empty; await Service.CreateBusinessAsync(business); + alertMessage = $"{business.BusinessName} created"; } catch (TaskCanceledException) { diff --git a/src/Subjects/Presentation.Web.BlazorServer/Program.cs b/src/Subjects/Presentation.Web.BlazorServer/Program.cs index 1791a240..acf7715e 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/Program.cs +++ b/src/Subjects/Presentation.Web.BlazorServer/Program.cs @@ -32,6 +32,11 @@ builder.Services.AddServerSideBlazor() .AddMicrosoftIdentityConsentHandler(); +if (builder.Environment.IsDevelopment() || string.Equals(builder.Environment.EnvironmentName, "local", StringComparison.InvariantCultureIgnoreCase)) +{ + builder.WebHost.UseStaticWebAssets(); +} + builder.Services.AddApplicationInsightsTelemetry(options => { options.ConnectionString = builder.Configuration["ApplicationInsights:ConnectionString"]; @@ -51,7 +56,7 @@ // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) -{ +{ app.UseExceptionHandler("/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); diff --git a/src/Subjects/Presentation.Web.BlazorServer/appsettings.Local.json b/src/Subjects/Presentation.Web.BlazorServer/appsettings.Local.json new file mode 100644 index 00000000..e21023c6 --- /dev/null +++ b/src/Subjects/Presentation.Web.BlazorServer/appsettings.Local.json @@ -0,0 +1,36 @@ +{ + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "AzureAd": { + "Instance": "https://GoodToCodeB2CDev.b2clogin.com/", + "Domain": "GoodToCodeB2CDev.onmicrosoft.com", + "TenantId": "e4d5c76a-bc01-46b5-87ec-8a43a0ee2950", + "ClientId": "9380a639-c396-491a-ae90-6137b48a9f4f", + "CallbackPath": "/signin-oidc", + "SignUpSignInPolicyId": "B2C_1_Signup_Signin", + "SignedOutCallbackPath": "/signout/B2C_1_susi", + "ResetPasswordPolicyId": "b2c_1_reset", + "EditProfilePolicyId": "b2c_1_edit_profile", + "EnablePiiLogging": true + }, + "Azure": { + "UseKeyVault": true, + "KeyVaultUri": "https://kv-subjects-dev-001.vault.azure.net/" + }, + "Subjects": { + "ClientId": "e5a3284b-9aa7-43ee-9dc5-e2aa0be1908a", + "TokenUrl": "https://login.microsoftonline.com/ad6529dd-8db1-4015-a53d-6ae395fc7e39/oauth2/v2.0/token", + "Scope": "api://7cf20ddf-bc1b-423e-b516-43d386b31da5/.default", + "Url": "https://localhost:7171" + } + //"Subjects:ClientSecret": "FROM_KEY_VAULT" + //"ApplicationInsights": { + // "ConnectionString": "FROM_APP_SERVICE" + //} +} From e32d8c5c1cb756d13307991e0af5ed5e4dd3a410 Mon Sep 17 00:00:00 2001 From: Robert Good Date: Sat, 24 Jun 2023 21:59:51 -0700 Subject: [PATCH 26/26] progress indicator --- .../Pages/Business/BusinessList.razor | 18 ++++++++++++++---- .../wwwroot/css/site.css | 7 +++++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor index 4ac47ae5..01596e3d 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor +++ b/src/Subjects/Presentation.Web.BlazorServer/Pages/Business/BusinessList.razor @@ -17,6 +17,9 @@
+
@@ -48,25 +51,32 @@ private BusinessSearchModel businessSearch = new BusinessSearchModel(); private IEnumerable businesses = new List(); private CancellationTokenSource cts = new CancellationTokenSource(); + private bool processing; private async Task GetBusineses() { - if (!Validator.TryValidateObject(businessSearch, + alertMessage = string.Empty; + + if (!Validator.TryValidateObject(businessSearch, new ValidationContext(businessSearch, serviceProvider: null, items: null), new List(), true)) return; if (cts != null) cts.Cancel(); cts = new CancellationTokenSource(); try { - await Task.Delay(500, cts.Token); - alertMessage = string.Empty; + processing = true; + await Task.Delay(500, cts.Token); businesses = await Service.GetBusinessesAsync(businessSearch.Name); if (businesses.Count() == 0) alertMessage = "No businesses found"; } catch (TaskCanceledException) { - // Ignore exception if task was cancelled + // Ignore exception if task was cancelled + } + finally + { + processing = false; } } } diff --git a/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/site.css b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/site.css index 96b05836..3cb57ea0 100644 --- a/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/site.css +++ b/src/Subjects/Presentation.Web.BlazorServer/wwwroot/css/site.css @@ -25,7 +25,14 @@ a, .btn-link { .content { padding-top: 1.1rem; } +/* Positioning */ +.center-screen { + position: fixed; + top: 50%; + left: 50%; +} +/* Validation styles */ .valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }