Skip to content

Commit 95e4493

Browse files
authored
Merge pull request #11 from CodeFactoryLLC/Automation-Beta
Automation beta
2 parents 6bf6bb0 + 41b6dd2 commit 95e4493

File tree

108 files changed

+11080
-38
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+11080
-38
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.32014.148
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutomationTesting", "AutomationTesting\AutomationTesting.csproj", "{5A5D2A91-6CB5-4F09-8AE2-FEDA0BEA16C8}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Model.Sql", "Demo.Model.Sql\Demo.Model.Sql.csproj", "{8EF6D2CB-1554-4E95-BD17-7341FB6E5587}"
9+
EndProject
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Model.App", "Demo.Model.App\Demo.Model.App.csproj", "{8CF2D90A-0D22-481C-999B-5EB26EDD5256}"
11+
EndProject
12+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Data.Contract", "Demo.Data.Contract\Demo.Data.Contract.csproj", "{463FC11D-501C-4219-B3FB-A77C4F75A3C7}"
13+
EndProject
14+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Data.Sql", "Demo.Data.Sql\Demo.Data.Sql.csproj", "{026832C2-494A-4FE1-8BB6-E0485B435B09}"
15+
EndProject
16+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Logic", "Demo.Logic\Demo.Logic.csproj", "{9B6C672C-5036-47B9-8C7D-2084CDAC2838}"
17+
EndProject
18+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Service.Rest", "Demo.Service.Rest\Demo.Service.Rest.csproj", "{4F2B5263-AE13-453E-AF91-5FB3A8475601}"
19+
EndProject
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Model.Rest", "Demo.Model.Rest\Demo.Model.Rest.csproj", "{1F75AE56-2C51-4016-88C8-CD1C0558C912}"
21+
EndProject
22+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Demo.Abstract", "Demo.Abstract\Demo.Abstract.csproj", "{A7E2E0A6-295F-445F-8048-2E61D855B1FA}"
23+
EndProject
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Model.Rpc", "Demo.Model.Rpc\Demo.Model.Rpc.csproj", "{88EFE902-1376-4827-9D13-785586B7AF65}"
25+
EndProject
26+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Service.Rpc", "Demo.Service.Rpc\Demo.Service.Rpc.csproj", "{0AF3CF44-34A5-4641-AAEA-F700B21116DD}"
27+
EndProject
28+
Global
29+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
30+
Debug|Any CPU = Debug|Any CPU
31+
Release|Any CPU = Release|Any CPU
32+
EndGlobalSection
33+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
34+
{5A5D2A91-6CB5-4F09-8AE2-FEDA0BEA16C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35+
{5A5D2A91-6CB5-4F09-8AE2-FEDA0BEA16C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
36+
{5A5D2A91-6CB5-4F09-8AE2-FEDA0BEA16C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
37+
{5A5D2A91-6CB5-4F09-8AE2-FEDA0BEA16C8}.Release|Any CPU.Build.0 = Release|Any CPU
38+
{8EF6D2CB-1554-4E95-BD17-7341FB6E5587}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
39+
{8EF6D2CB-1554-4E95-BD17-7341FB6E5587}.Debug|Any CPU.Build.0 = Debug|Any CPU
40+
{8EF6D2CB-1554-4E95-BD17-7341FB6E5587}.Release|Any CPU.ActiveCfg = Release|Any CPU
41+
{8EF6D2CB-1554-4E95-BD17-7341FB6E5587}.Release|Any CPU.Build.0 = Release|Any CPU
42+
{8CF2D90A-0D22-481C-999B-5EB26EDD5256}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43+
{8CF2D90A-0D22-481C-999B-5EB26EDD5256}.Debug|Any CPU.Build.0 = Debug|Any CPU
44+
{8CF2D90A-0D22-481C-999B-5EB26EDD5256}.Release|Any CPU.ActiveCfg = Release|Any CPU
45+
{8CF2D90A-0D22-481C-999B-5EB26EDD5256}.Release|Any CPU.Build.0 = Release|Any CPU
46+
{463FC11D-501C-4219-B3FB-A77C4F75A3C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
47+
{463FC11D-501C-4219-B3FB-A77C4F75A3C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
48+
{463FC11D-501C-4219-B3FB-A77C4F75A3C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
49+
{463FC11D-501C-4219-B3FB-A77C4F75A3C7}.Release|Any CPU.Build.0 = Release|Any CPU
50+
{026832C2-494A-4FE1-8BB6-E0485B435B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51+
{026832C2-494A-4FE1-8BB6-E0485B435B09}.Debug|Any CPU.Build.0 = Debug|Any CPU
52+
{026832C2-494A-4FE1-8BB6-E0485B435B09}.Release|Any CPU.ActiveCfg = Release|Any CPU
53+
{026832C2-494A-4FE1-8BB6-E0485B435B09}.Release|Any CPU.Build.0 = Release|Any CPU
54+
{9B6C672C-5036-47B9-8C7D-2084CDAC2838}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55+
{9B6C672C-5036-47B9-8C7D-2084CDAC2838}.Debug|Any CPU.Build.0 = Debug|Any CPU
56+
{9B6C672C-5036-47B9-8C7D-2084CDAC2838}.Release|Any CPU.ActiveCfg = Release|Any CPU
57+
{9B6C672C-5036-47B9-8C7D-2084CDAC2838}.Release|Any CPU.Build.0 = Release|Any CPU
58+
{4F2B5263-AE13-453E-AF91-5FB3A8475601}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59+
{4F2B5263-AE13-453E-AF91-5FB3A8475601}.Debug|Any CPU.Build.0 = Debug|Any CPU
60+
{4F2B5263-AE13-453E-AF91-5FB3A8475601}.Release|Any CPU.ActiveCfg = Release|Any CPU
61+
{4F2B5263-AE13-453E-AF91-5FB3A8475601}.Release|Any CPU.Build.0 = Release|Any CPU
62+
{1F75AE56-2C51-4016-88C8-CD1C0558C912}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63+
{1F75AE56-2C51-4016-88C8-CD1C0558C912}.Debug|Any CPU.Build.0 = Debug|Any CPU
64+
{1F75AE56-2C51-4016-88C8-CD1C0558C912}.Release|Any CPU.ActiveCfg = Release|Any CPU
65+
{1F75AE56-2C51-4016-88C8-CD1C0558C912}.Release|Any CPU.Build.0 = Release|Any CPU
66+
{A7E2E0A6-295F-445F-8048-2E61D855B1FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
67+
{A7E2E0A6-295F-445F-8048-2E61D855B1FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
68+
{A7E2E0A6-295F-445F-8048-2E61D855B1FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
69+
{A7E2E0A6-295F-445F-8048-2E61D855B1FA}.Release|Any CPU.Build.0 = Release|Any CPU
70+
{88EFE902-1376-4827-9D13-785586B7AF65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
71+
{88EFE902-1376-4827-9D13-785586B7AF65}.Debug|Any CPU.Build.0 = Debug|Any CPU
72+
{88EFE902-1376-4827-9D13-785586B7AF65}.Release|Any CPU.ActiveCfg = Release|Any CPU
73+
{88EFE902-1376-4827-9D13-785586B7AF65}.Release|Any CPU.Build.0 = Release|Any CPU
74+
{0AF3CF44-34A5-4641-AAEA-F700B21116DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
75+
{0AF3CF44-34A5-4641-AAEA-F700B21116DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
76+
{0AF3CF44-34A5-4641-AAEA-F700B21116DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
77+
{0AF3CF44-34A5-4641-AAEA-F700B21116DD}.Release|Any CPU.Build.0 = Release|Any CPU
78+
EndGlobalSection
79+
GlobalSection(SolutionProperties) = preSolution
80+
HideSolutionNode = FALSE
81+
EndGlobalSection
82+
GlobalSection(ExtensibilityGlobals) = postSolution
83+
SolutionGuid = {B8E90B64-C86B-4E4A-A837-B50FE5E44817}
84+
EndGlobalSection
85+
EndGlobal
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="CommonDeliveryFramework" Version="1.22006.1" />
11+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+

2+
using System.Threading.Tasks;
3+
using System;
4+
using CommonDeliveryFramework;
5+
using Microsoft.Extensions.Logging;
6+
namespace AutomationTesting
7+
{
8+
public class Class1:ITest
9+
{
10+
11+
/// <summary>
12+
/// Logger for all logging interactions in the class.
13+
/// </summary>
14+
private readonly ILogger _logger;
15+
16+
public Class1(ILogger<Class1> logger)
17+
{
18+
_logger = logger;
19+
}
20+
21+
public async Task<string> GetNameAsync(Guid id, string lastName, string firstName = null)
22+
{
23+
_logger.InformationEnterLog();
24+
25+
if(string.IsNullOrEmpty(lastName))
26+
{
27+
_logger.ErrorLog($"The parameter {nameof(lastName)} was not provided. Will raise an argument exception");
28+
_logger.InformationExitLog();
29+
throw new ValidationException(nameof(lastName));
30+
}
31+
32+
try
33+
{
34+
//TODO: add execution logic here
35+
}
36+
catch (ManagedException)
37+
{
38+
//Throwing the managed exception. Override this logic if you have logic in this method to handle managed errors.
39+
throw;
40+
}
41+
catch (Exception unhandledException)
42+
{
43+
_logger.ErrorLog("An unhandled exception occurred, see the exception for details. Will throw a UnhandledException", unhandledException);
44+
_logger.InformationExitLog();
45+
throw new UnhandledException();
46+
}
47+
48+
_logger.InformationExitLog();
49+
throw new NotImplementedException();
50+
51+
//TODO: add return logic here
52+
}
53+
54+
55+
public string FirstName { get; set; }
56+
57+
}
58+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace AutomationTesting
8+
{
9+
public interface ITest
10+
{
11+
string FirstName { get; set; }
12+
13+
Task<string> GetNameAsync(Guid id, string lastName, string firstName = null);
14+
}
15+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using CommonDeliveryFramework;
7+
using Microsoft.Extensions.Configuration;
8+
using Microsoft.Extensions.DependencyInjection;
9+
10+
namespace AutomationTesting
11+
{
12+
public class Loader:DependencyInjectionLibraryLoader
13+
{
14+
/// <inheritdoc />
15+
protected override void LoadLibraries(IServiceCollection serviceCollection, IConfiguration configuration)
16+
{
17+
throw new NotImplementedException();
18+
}
19+
20+
protected override void LoadManualRegistration(IServiceCollection serviceCollection, IConfiguration configuration)
21+
{
22+
throw new NotImplementedException();
23+
}
24+
25+
26+
/// <inheritdoc />
27+
protected override void LoadRegistration(IServiceCollection serviceCollection, IConfiguration configuration)
28+
{
29+
30+
}
31+
}
32+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="CommonDeliveryFramework" Version="1.22006.1" />
11+
<PackageReference Include="CommonDeliveryFramework.Grpc" Version="1.22006.2" />
12+
<PackageReference Include="Grpc.Net.Client" Version="2.41.0" />
13+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
14+
<PackageReference Include="protobuf-net.Grpc" Version="1.0.152" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<ProjectReference Include="..\Demo.Model.App\Demo.Model.App.csproj" />
19+
<ProjectReference Include="..\Demo.Model.Rest\Demo.Model.Rest.csproj" />
20+
<ProjectReference Include="..\Demo.Model.Rpc\Demo.Model.Rpc.csproj" />
21+
<ProjectReference Include="..\Demo.Service.Rest\Demo.Service.Rest.csproj" />
22+
</ItemGroup>
23+
24+
</Project>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using CommonDeliveryFramework;
7+
using Microsoft.Extensions.Configuration;
8+
using Microsoft.Extensions.DependencyInjection;
9+
10+
namespace Demo.Abstract
11+
{
12+
public class Loader:DependencyInjectionLibraryLoader
13+
{
14+
/// <inheritdoc />
15+
protected override void LoadLibraries(IServiceCollection serviceCollection, IConfiguration configuration)
16+
{
17+
18+
}
19+
20+
protected override void LoadManualRegistration(IServiceCollection serviceCollection, IConfiguration configuration)
21+
{
22+
23+
}
24+
25+
26+
27+
28+
29+
30+
31+
/// <inheritdoc />
32+
protected override void LoadRegistration(IServiceCollection serviceCollection, IConfiguration configuration)
33+
{
34+
}
35+
}
36+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="CommonDeliveryFramework" Version="1.22006.1" />
9+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
10+
</ItemGroup>
11+
12+
<ItemGroup>
13+
<ProjectReference Include="..\Demo.Model.App\Demo.Model.App.csproj" />
14+
</ItemGroup>
15+
16+
</Project>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="CommonDeliveryFramework" Version="1.22006.1" />
11+
<PackageReference Include="CommonDeliveryFramework.Database" Version="1.22006.1" />
12+
<PackageReference Include="Dapper" Version="2.0.123" />
13+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
14+
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
15+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<ProjectReference Include="..\Demo.Data.Contract\Demo.Data.Contract.csproj" />
20+
<ProjectReference Include="..\Demo.Model.App\Demo.Model.App.csproj" />
21+
<ProjectReference Include="..\Demo.Model.Sql\Demo.Model.Sql.csproj" />
22+
</ItemGroup>
23+
24+
</Project>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using CommonDeliveryFramework;
7+
using Microsoft.Extensions.Configuration;
8+
using Microsoft.Extensions.DependencyInjection;
9+
10+
namespace Demo.Data.Sql
11+
{
12+
public class Loader:DependencyInjectionLibraryLoader
13+
{
14+
/// <inheritdoc />
15+
protected override void LoadLibraries(IServiceCollection serviceCollection, IConfiguration configuration)
16+
{
17+
18+
}
19+
20+
protected override void LoadManualRegistration(IServiceCollection serviceCollection, IConfiguration configuration)
21+
{
22+
23+
}
24+
25+
26+
27+
28+
29+
/// <inheritdoc />
30+
protected override void LoadRegistration(IServiceCollection serviceCollection, IConfiguration configuration)
31+
{
32+
//This method was auto generated, do not modify by hand!
33+
serviceCollection.AddTransient<Demo.Data.Contract.IDeptRepository, DeptRepository>();
34+
serviceCollection.AddTransient<Demo.Data.Contract.IUserRepository, UserRepository>();
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)