Skip to content

Commit

Permalink
Added unit tests Generators and Analyzers
Browse files Browse the repository at this point in the history
  • Loading branch information
jezzsantos committed Oct 8, 2023
1 parent 45ccbb1 commit aead4d5
Show file tree
Hide file tree
Showing 16 changed files with 1,212 additions and 165 deletions.
12 changes: 12 additions & 0 deletions src/Infrastructure.WebApi.Interfaces/IWebRequest.AspNet.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using MediatR;
using Microsoft.AspNetCore.Http;

namespace Infrastructure.WebApi.Interfaces;

/// <summary>
/// Defines a incoming REST request and response.
/// Note: <see cref="IRequest{IResult}" /> is required for the MediatR handlers to be wired up
/// </summary>
public partial interface IWebRequest : IRequest<IResult>
{
}
8 changes: 3 additions & 5 deletions src/Infrastructure.WebApi.Interfaces/IWebRequest.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
using MediatR;
using Microsoft.AspNetCore.Http;

namespace Infrastructure.WebApi.Interfaces;

/// <summary>
/// Defines a incoming REST request and response.
/// Note: <see cref="IRequest{IResult}" /> is required for the MediatR handlers to be wired up
/// Note: we have split this interface definition so it can be reused in Roslyn components
/// </summary>
public interface IWebRequest : IRequest<IResult>
// ReSharper disable once PartialTypeWithSinglePart
public partial interface IWebRequest
{
}

Expand Down
9 changes: 9 additions & 0 deletions src/SaaStack.sln
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tools.Templates", "Tools.Te
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application.Common.UnitTests", "Application.Common.UnitTests\Application.Common.UnitTests.csproj", "{A67A4EA1-58CF-41ED-AEED-591D4A8A0633}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tools.Generators.WebApi.UnitTests", "Tools.Generators.WebApi.UnitTests\Tools.Generators.WebApi.UnitTests.csproj", "{64762CCC-834E-47C9-AFAD-B88DB80E3FF8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -311,6 +313,12 @@ Global
{A67A4EA1-58CF-41ED-AEED-591D4A8A0633}.Release|Any CPU.Build.0 = Release|Any CPU
{A67A4EA1-58CF-41ED-AEED-591D4A8A0633}.ReleaseForDeploy|Any CPU.ActiveCfg = ReleaseForDeploy|Any CPU
{A67A4EA1-58CF-41ED-AEED-591D4A8A0633}.ReleaseForDeploy|Any CPU.Build.0 = ReleaseForDeploy|Any CPU
{64762CCC-834E-47C9-AFAD-B88DB80E3FF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64762CCC-834E-47C9-AFAD-B88DB80E3FF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64762CCC-834E-47C9-AFAD-B88DB80E3FF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64762CCC-834E-47C9-AFAD-B88DB80E3FF8}.Release|Any CPU.Build.0 = Release|Any CPU
{64762CCC-834E-47C9-AFAD-B88DB80E3FF8}.ReleaseForDeploy|Any CPU.ActiveCfg = ReleaseForDeploy|Any CPU
{64762CCC-834E-47C9-AFAD-B88DB80E3FF8}.ReleaseForDeploy|Any CPU.Build.0 = ReleaseForDeploy|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F5C77A86-38AF-40E4-82FC-617E624B2754} = {508E7DA4-4DF2-4201-955D-CCF70C41AD05}
Expand Down Expand Up @@ -368,5 +376,6 @@ Global
{AC380EA5-16A1-4713-99B4-F259F5397F30} = {4B1A213C-36A7-41A7-BFC7-B3CFF5795912}
{CDA1C120-6847-4486-863D-875E47291A50} = {BAE0D6F2-6920-4B02-9F30-D71B04B7170D}
{A67A4EA1-58CF-41ED-AEED-591D4A8A0633} = {5B6DE1D9-649A-47EE-A565-0B641B7838FF}
{64762CCC-834E-47C9-AFAD-B88DB80E3FF8} = {A25A3BA8-5602-4825-9595-2CF96B166920}
EndGlobalSection
EndGlobal
4 changes: 4 additions & 0 deletions src/SaaStack.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,15 @@ public void When$condition$_Then$outcome$()
<s:Boolean x:Key="/Default/UserDictionary/Words/=acallerid/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=acallid/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=acorrelationid/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=adisplaystring/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=afilter/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=afilterfield/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=alocation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=amake/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=amessage/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=amodel/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=aname/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=anamespace/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Anding/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=anid/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=anotherresource/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -387,6 +389,8 @@ public void When$condition$_Then$outcome$()
<s:Boolean x:Key="/Default/UserDictionary/Words/=areplacement/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=aresource/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=aresourceref/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=aroute/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=aserviceclass/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=asort/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=asortfield/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=atenantid/@EntryIndexedValue">True</s:Boolean>
Expand Down
Loading

0 comments on commit aead4d5

Please sign in to comment.