From 29e4928a736fcecc7f25ed8754283c1cae00ac03 Mon Sep 17 00:00:00 2001 From: MaxchilKH Date: Wed, 30 Sep 2020 21:38:45 +0200 Subject: [PATCH] gtfo --- .../Services/IInternshipService.cs | 3 +-- .../Services/InternshipService.cs | 3 +-- test/InternshipSystem.Api.Test/InternshipSystem.cs | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/InternshipSystem.Api/Services/IInternshipService.cs b/src/InternshipSystem.Api/Services/IInternshipService.cs index 042eef0..e3a7294 100644 --- a/src/InternshipSystem.Api/Services/IInternshipService.cs +++ b/src/InternshipSystem.Api/Services/IInternshipService.cs @@ -8,7 +8,6 @@ namespace InternshipSystem.Api.Services { public interface IInternshipService { - Task AddDocumentToInternship(DocumentPublishRequest documentRequest, long personNumber, - CancellationToken cancellationToken); + Task AddDocumentToInternship(DocumentPublishRequest documentRequest, User user, CancellationToken cancellationToken); } } \ No newline at end of file diff --git a/src/InternshipSystem.Api/Services/InternshipService.cs b/src/InternshipSystem.Api/Services/InternshipService.cs index b7766cd..3ea6a7a 100644 --- a/src/InternshipSystem.Api/Services/InternshipService.cs +++ b/src/InternshipSystem.Api/Services/InternshipService.cs @@ -21,8 +21,7 @@ namespace InternshipSystem.Api.Services _context = context; Mapper = mapper; } - - + public async Task AddDocumentToInternship(DocumentPublishRequest documentRequest, User user, CancellationToken cancellationToken) { diff --git a/test/InternshipSystem.Api.Test/InternshipSystem.cs b/test/InternshipSystem.Api.Test/InternshipSystem.cs index 2033085..3e3632f 100644 --- a/test/InternshipSystem.Api.Test/InternshipSystem.cs +++ b/test/InternshipSystem.Api.Test/InternshipSystem.cs @@ -2,7 +2,9 @@ using System; using System.Collections.Generic; using System.Text.Json; using InternshipSystem.Api.Controllers; +using InternshipSystem.Repository; using Machine.Specifications; +using Microsoft.EntityFrameworkCore; namespace InternshipSystem.Api.Test { @@ -56,4 +58,16 @@ namespace InternshipSystem.Api.Test private static JsonSerializerOptions options; private static CasUserProfile result; } + + class When_writing_tests_only_for_debug_because_i_gave_up_on_code_quality + { + private Establish context = () => + { + var db = new InternshipDbContext(new DbContextOptionsBuilder() + .UseNpgsql("Host=localhost;Port=5432;Database=postgres;Username=postgres;Password=szwoniu") + .Options); + + var e + }; + } }