This commit is contained in:
2022-09-21 16:53:02 +02:00
parent 527ba10c1a
commit 40150215f2
5 changed files with 104 additions and 3 deletions

View File

@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="EonaCatHelpers" Version="1.3.6" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="4.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\EonaCatMocker\EonaCat.Mocking.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="EonaCat.Helpers">
<HintPath>..\..\EonaCatHelpers\EonaCat.Helpers\bin\Release\net6.0\EonaCat.Helpers.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

31
Mocktester/MockTester.sln Normal file
View File

@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.32112.339
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MockTester", "MockTester.csproj", "{D5E2E874-0FD2-4481-BE8C-517C382342AE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EonaCat.Mocking", "..\..\EonaCatMocker\EonaCat.Mocking.csproj", "{2FB81818-47C1-47CE-931D-8DF6810CED50}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D5E2E874-0FD2-4481-BE8C-517C382342AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5E2E874-0FD2-4481-BE8C-517C382342AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5E2E874-0FD2-4481-BE8C-517C382342AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5E2E874-0FD2-4481-BE8C-517C382342AE}.Release|Any CPU.Build.0 = Release|Any CPU
{2FB81818-47C1-47CE-931D-8DF6810CED50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FB81818-47C1-47CE-931D-8DF6810CED50}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FB81818-47C1-47CE-931D-8DF6810CED50}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FB81818-47C1-47CE-931D-8DF6810CED50}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7E7E2E90-9289-4D68-A918-A465BE4315AF}
EndGlobalSection
EndGlobal

26
Mocktester/Program.cs Normal file
View File

@@ -0,0 +1,26 @@

using EonaCat.Json;
using EonaCat.Mocking;
using System;
namespace EonaCat.Tester.Mocking
{
public static class MockTest
{
public static void Main(string[] args)
{
var user = new MockHelper().Generate<User>();
Console.WriteLine(JsonHelper.ToJson(user));
}
}
public class User
{
public string Name { get; set; }
public int Id { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public DateTime BirthDate { get; set; }
public string CompanyName { get; set; }
}
}