From f9da73ea768aa0732f39a8155c2e8a9d2bc761c3 Mon Sep 17 00:00:00 2001 From: MaxchilKH Date: Fri, 22 May 2020 08:59:16 +0200 Subject: [PATCH] Initialize Core Model --- .docker/docker-compose.yaml | 4 +- .vscode/launch.json | 36 ++++++++ .vscode/tasks.json | 42 ++++++++++ Internship.Core/Internship.Core.csproj | 7 ++ InternshipSystem.sln | 83 +++++++++++++++++++ props/Directory.Tests.Build.props | 0 .../Controllers/WeatherForecastController.cs | 4 + src/Internship.Api/Dockerfile | 2 +- src/Internship.Api/Internship.Api.csproj | 9 +- src/Internship.Api/Program.cs | 15 ++-- src/Internship.Api/Startup.cs | 17 ++-- src/Internship.Core/BranchOffice.cs | 6 ++ src/Internship.Core/Edition.cs | 11 +++ src/Internship.Core/Intern.cs | 11 +++ src/Internship.Core/Internship.Core.csproj | 7 ++ src/Internship.Core/Internship.cs | 11 +++ src/Internship.Core/InternshipProgram.cs | 6 ++ src/Internship.Core/Report.cs | 6 ++ .../Internship.Repository.csproj | 7 +- .../Internship.Api.Test.csproj | 18 ++++ test/Internship.Api.Test/InternshipTests.cs | 6 ++ .../Internship.Core.Tests.csproj | 22 +++++ test/Internship.Core.Tests/Internship.Test.cs | 17 ++++ 23 files changed, 330 insertions(+), 17 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json create mode 100644 Internship.Core/Internship.Core.csproj create mode 100644 props/Directory.Tests.Build.props create mode 100644 src/Internship.Core/BranchOffice.cs create mode 100644 src/Internship.Core/Edition.cs create mode 100644 src/Internship.Core/Intern.cs create mode 100644 src/Internship.Core/Internship.Core.csproj create mode 100644 src/Internship.Core/Internship.cs create mode 100644 src/Internship.Core/InternshipProgram.cs create mode 100644 src/Internship.Core/Report.cs create mode 100644 test/Internship.Api.Test/Internship.Api.Test.csproj create mode 100644 test/Internship.Api.Test/InternshipTests.cs create mode 100644 test/Internship.Core.Tests/Internship.Core.Tests.csproj create mode 100644 test/Internship.Core.Tests/Internship.Test.cs diff --git a/.docker/docker-compose.yaml b/.docker/docker-compose.yaml index 6a9e69e..06af3a6 100644 --- a/.docker/docker-compose.yaml +++ b/.docker/docker-compose.yaml @@ -1,7 +1,9 @@ -version: "3.8" +version: "3.3" services: internship.api: image: internship.api:latest build: ../src/Internship.Api + ports: + - 8080:80 \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..1d4bc6e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,36 @@ +{ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (web)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/src/Internship.Api/bin/Debug/netcoreapp3.1/Internship.Api.dll", + "args": [], + "cwd": "${workspaceFolder}/src/Internship.Api", + "stopAtEntry": false, + // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser + "serverReadyAction": { + "action": "openExternally", + "pattern": "^\\s*Now listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..a954e09 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,42 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/src/Internship.Api/Internship.Api.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/src/Internship.Api/Internship.Api.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "${workspaceFolder}/src/Internship.Api/Internship.Api.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/Internship.Core/Internship.Core.csproj b/Internship.Core/Internship.Core.csproj new file mode 100644 index 0000000..8642d92 --- /dev/null +++ b/Internship.Core/Internship.Core.csproj @@ -0,0 +1,7 @@ + + + + netcoreapp3.1 + + + diff --git a/InternshipSystem.sln b/InternshipSystem.sln index 2f92ebd..752cf0d 100644 --- a/InternshipSystem.sln +++ b/InternshipSystem.sln @@ -3,6 +3,20 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26124.0 MinimumVisualStudioVersion = 15.0.26124.0 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A43DB15B-657C-4E02-BC1B-2670DD34D9E0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Internship.Api", "src\Internship.Api\Internship.Api.csproj", "{2C72839D-2E0B-4794-9324-3E9E622251E3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Internship.Repository", "src\Internship.Repository\Internship.Repository.csproj", "{A4697640-0746-4720-9B20-923763612F1A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Internship.Core", "src\Internship.Core\Internship.Core.csproj", "{2C395A11-E3A2-4454-95A1-82A3EAE791EC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{69F62FEE-6768-4B47-9295-4EF5E8E30BEA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Internship.Api.Test", "test\Internship.Api.Test\Internship.Api.Test.csproj", "{90365B6B-B2C6-49D9-84F7-F806B06C1AFE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Internship.Core.Tests", "test\Internship.Core.Tests\Internship.Core.Tests.csproj", "{748544B4-CBDA-4123-9BD9-499F6C90567F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,4 +29,73 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Debug|x64.ActiveCfg = Debug|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Debug|x64.Build.0 = Debug|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Debug|x86.ActiveCfg = Debug|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Debug|x86.Build.0 = Debug|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Release|Any CPU.Build.0 = Release|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Release|x64.ActiveCfg = Release|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Release|x64.Build.0 = Release|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Release|x86.ActiveCfg = Release|Any CPU + {2C72839D-2E0B-4794-9324-3E9E622251E3}.Release|x86.Build.0 = Release|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Debug|x64.ActiveCfg = Debug|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Debug|x64.Build.0 = Debug|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Debug|x86.ActiveCfg = Debug|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Debug|x86.Build.0 = Debug|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Release|Any CPU.Build.0 = Release|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Release|x64.ActiveCfg = Release|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Release|x64.Build.0 = Release|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Release|x86.ActiveCfg = Release|Any CPU + {A4697640-0746-4720-9B20-923763612F1A}.Release|x86.Build.0 = Release|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Debug|x64.ActiveCfg = Debug|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Debug|x64.Build.0 = Debug|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Debug|x86.ActiveCfg = Debug|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Debug|x86.Build.0 = Debug|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Release|Any CPU.Build.0 = Release|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Release|x64.ActiveCfg = Release|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Release|x64.Build.0 = Release|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Release|x86.ActiveCfg = Release|Any CPU + {2C395A11-E3A2-4454-95A1-82A3EAE791EC}.Release|x86.Build.0 = Release|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Debug|x64.ActiveCfg = Debug|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Debug|x64.Build.0 = Debug|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Debug|x86.ActiveCfg = Debug|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Debug|x86.Build.0 = Debug|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Release|Any CPU.Build.0 = Release|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Release|x64.ActiveCfg = Release|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Release|x64.Build.0 = Release|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Release|x86.ActiveCfg = Release|Any CPU + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE}.Release|x86.Build.0 = Release|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Debug|x64.ActiveCfg = Debug|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Debug|x64.Build.0 = Debug|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Debug|x86.ActiveCfg = Debug|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Debug|x86.Build.0 = Debug|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Release|Any CPU.Build.0 = Release|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Release|x64.ActiveCfg = Release|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Release|x64.Build.0 = Release|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Release|x86.ActiveCfg = Release|Any CPU + {748544B4-CBDA-4123-9BD9-499F6C90567F}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {2C72839D-2E0B-4794-9324-3E9E622251E3} = {A43DB15B-657C-4E02-BC1B-2670DD34D9E0} + {A4697640-0746-4720-9B20-923763612F1A} = {A43DB15B-657C-4E02-BC1B-2670DD34D9E0} + {2C395A11-E3A2-4454-95A1-82A3EAE791EC} = {A43DB15B-657C-4E02-BC1B-2670DD34D9E0} + {90365B6B-B2C6-49D9-84F7-F806B06C1AFE} = {69F62FEE-6768-4B47-9295-4EF5E8E30BEA} + {748544B4-CBDA-4123-9BD9-499F6C90567F} = {69F62FEE-6768-4B47-9295-4EF5E8E30BEA} + EndGlobalSection EndGlobal diff --git a/props/Directory.Tests.Build.props b/props/Directory.Tests.Build.props new file mode 100644 index 0000000..e69de29 diff --git a/src/Internship.Api/Controllers/WeatherForecastController.cs b/src/Internship.Api/Controllers/WeatherForecastController.cs index b5691d8..0d6af37 100644 --- a/src/Internship.Api/Controllers/WeatherForecastController.cs +++ b/src/Internship.Api/Controllers/WeatherForecastController.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; +using Serilog; namespace Internship.Api.Controllers { @@ -27,6 +28,9 @@ namespace Internship.Api.Controllers public IEnumerable Get() { var rng = new Random(); + + Log.Warning("Randomly generated number was: {Rng}", rng); + return Enumerable.Range(1, 5).Select(index => new WeatherForecast { Date = DateTime.Now.AddDays(index), diff --git a/src/Internship.Api/Dockerfile b/src/Internship.Api/Dockerfile index e37de99..3361645 100644 --- a/src/Internship.Api/Dockerfile +++ b/src/Internship.Api/Dockerfile @@ -13,4 +13,4 @@ RUN dotnet publish -c Release -o out FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine WORKDIR /app COPY --from=build-env /app/out . -ENTRYPOINT ["dotnet", "InternshipSystem.dll"] +ENTRYPOINT ["dotnet", "./Internship.Api.dll"] diff --git a/src/Internship.Api/Internship.Api.csproj b/src/Internship.Api/Internship.Api.csproj index d12c450..b69d036 100644 --- a/src/Internship.Api/Internship.Api.csproj +++ b/src/Internship.Api/Internship.Api.csproj @@ -1,8 +1,15 @@ - + netcoreapp3.1 + + + + + + + diff --git a/src/Internship.Api/Program.cs b/src/Internship.Api/Program.cs index 6caa120..35b70dd 100644 --- a/src/Internship.Api/Program.cs +++ b/src/Internship.Api/Program.cs @@ -6,6 +6,9 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; +using Serilog; +using Serilog.Events; +using Serilog.Formatting.Compact; namespace Internship.Api { @@ -18,10 +21,12 @@ namespace Internship.Api public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder - .UseStartup(); - }); + .UseSerilog((context, configuration) => + configuration + .Enrich.FromLogContext() + .MinimumLevel.Debug() + .MinimumLevel.Override("Microsoft", LogEventLevel.Information) + .WriteTo.Console()) + .ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup()); } } diff --git a/src/Internship.Api/Startup.cs b/src/Internship.Api/Startup.cs index 104fc49..9c968d7 100644 --- a/src/Internship.Api/Startup.cs +++ b/src/Internship.Api/Startup.cs @@ -10,33 +10,34 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; namespace Internship.Api { public class Startup { - public Startup(IConfiguration configuration) - { + private IConfiguration Configuration { get; } + + public Startup(IConfiguration configuration) => Configuration = configuration; - } - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) => services + .AddSwaggerGen(options => + options.SwaggerDoc("v1", new OpenApiInfo {Title = "InternshipSystem Api", Version = "v1"})) .AddControllers() ; - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } - + app + .UseSwagger() + .UseSwaggerUI(options => options.SwaggerEndpoint("/swagger/v1/swagger.json", "InternshipSystem Api")) .UseHttpsRedirection() .UseRouting() .UseAuthorization() diff --git a/src/Internship.Core/BranchOffice.cs b/src/Internship.Core/BranchOffice.cs new file mode 100644 index 0000000..79cb9f9 --- /dev/null +++ b/src/Internship.Core/BranchOffice.cs @@ -0,0 +1,6 @@ +namespace Internship.Core +{ + public class BranchOffice + { + } +} \ No newline at end of file diff --git a/src/Internship.Core/Edition.cs b/src/Internship.Core/Edition.cs new file mode 100644 index 0000000..097e763 --- /dev/null +++ b/src/Internship.Core/Edition.cs @@ -0,0 +1,11 @@ +using System; + +namespace Internship.Core +{ + public class Edition + { + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + + } +} \ No newline at end of file diff --git a/src/Internship.Core/Intern.cs b/src/Internship.Core/Intern.cs new file mode 100644 index 0000000..14dcf0d --- /dev/null +++ b/src/Internship.Core/Intern.cs @@ -0,0 +1,11 @@ +using System; + +namespace Internship.Core +{ + public class Intern + { + public string AlbumNumber { get; set; } + public string Name { get; set; } + public string Surname { get; set; } + } +} \ No newline at end of file diff --git a/src/Internship.Core/Internship.Core.csproj b/src/Internship.Core/Internship.Core.csproj new file mode 100644 index 0000000..8642d92 --- /dev/null +++ b/src/Internship.Core/Internship.Core.csproj @@ -0,0 +1,7 @@ + + + + netcoreapp3.1 + + + diff --git a/src/Internship.Core/Internship.cs b/src/Internship.Core/Internship.cs new file mode 100644 index 0000000..423a589 --- /dev/null +++ b/src/Internship.Core/Internship.cs @@ -0,0 +1,11 @@ +namespace Internship.Core +{ + public class Internship + { + public Intern Intern { get; set; } + public Edition Edition { get; set; } + public Report Report { get; set; } + public BranchOffice BranchOffice { get; set; } + public InternshipProgram Program { get; set; } + } +} \ No newline at end of file diff --git a/src/Internship.Core/InternshipProgram.cs b/src/Internship.Core/InternshipProgram.cs new file mode 100644 index 0000000..b70d0de --- /dev/null +++ b/src/Internship.Core/InternshipProgram.cs @@ -0,0 +1,6 @@ +namespace Internship.Core +{ + public class InternshipProgram + { + } +} \ No newline at end of file diff --git a/src/Internship.Core/Report.cs b/src/Internship.Core/Report.cs new file mode 100644 index 0000000..805ffe9 --- /dev/null +++ b/src/Internship.Core/Report.cs @@ -0,0 +1,6 @@ +namespace Internship.Core +{ + public class Report + { + } +} \ No newline at end of file diff --git a/src/Internship.Repository/Internship.Repository.csproj b/src/Internship.Repository/Internship.Repository.csproj index 9f5c4f4..e137f83 100644 --- a/src/Internship.Repository/Internship.Repository.csproj +++ b/src/Internship.Repository/Internship.Repository.csproj @@ -1,7 +1,12 @@ - + netstandard2.0 + + + + + diff --git a/test/Internship.Api.Test/Internship.Api.Test.csproj b/test/Internship.Api.Test/Internship.Api.Test.csproj new file mode 100644 index 0000000..7d90bea --- /dev/null +++ b/test/Internship.Api.Test/Internship.Api.Test.csproj @@ -0,0 +1,18 @@ + + + + netcoreapp3.1 + + false + + + + + + + + + + + + diff --git a/test/Internship.Api.Test/InternshipTests.cs b/test/Internship.Api.Test/InternshipTests.cs new file mode 100644 index 0000000..b9e9970 --- /dev/null +++ b/test/Internship.Api.Test/InternshipTests.cs @@ -0,0 +1,6 @@ +using System; +using Machine.Specifications; + +namespace Internship.Api.Test +{ +} diff --git a/test/Internship.Core.Tests/Internship.Core.Tests.csproj b/test/Internship.Core.Tests/Internship.Core.Tests.csproj new file mode 100644 index 0000000..daba101 --- /dev/null +++ b/test/Internship.Core.Tests/Internship.Core.Tests.csproj @@ -0,0 +1,22 @@ + + + + netcoreapp3.1 + + false + + + + + + + + + + + + + + + + diff --git a/test/Internship.Core.Tests/Internship.Test.cs b/test/Internship.Core.Tests/Internship.Test.cs new file mode 100644 index 0000000..e91587b --- /dev/null +++ b/test/Internship.Core.Tests/Internship.Test.cs @@ -0,0 +1,17 @@ +using System; +using Machine.Specifications; +// ReSharper disable InconsistentNaming + +namespace Internship.Core.Tests +{ + [Subject(typeof(Internship))] + class When_doing_something + { + Establish context = () => { }; + + Because of = () => { }; + + It should_shit_a_brick = () => + false.ShouldBeTrue(); + } +}