This commit is contained in:
MaxchilKH 2020-09-30 21:38:45 +02:00
parent b9c5e23b3b
commit 29e4928a73
3 changed files with 16 additions and 4 deletions

View File

@ -8,7 +8,6 @@ namespace InternshipSystem.Api.Services
{ {
public interface IInternshipService public interface IInternshipService
{ {
Task<ActionResult> AddDocumentToInternship(DocumentPublishRequest documentRequest, long personNumber, Task<ActionResult> AddDocumentToInternship(DocumentPublishRequest documentRequest, User user, CancellationToken cancellationToken);
CancellationToken cancellationToken);
} }
} }

View File

@ -22,7 +22,6 @@ namespace InternshipSystem.Api.Services
Mapper = mapper; Mapper = mapper;
} }
public async Task<ActionResult> AddDocumentToInternship(DocumentPublishRequest documentRequest, User user, public async Task<ActionResult> AddDocumentToInternship(DocumentPublishRequest documentRequest, User user,
CancellationToken cancellationToken) CancellationToken cancellationToken)
{ {

View File

@ -2,7 +2,9 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.Json; using System.Text.Json;
using InternshipSystem.Api.Controllers; using InternshipSystem.Api.Controllers;
using InternshipSystem.Repository;
using Machine.Specifications; using Machine.Specifications;
using Microsoft.EntityFrameworkCore;
namespace InternshipSystem.Api.Test namespace InternshipSystem.Api.Test
{ {
@ -56,4 +58,16 @@ namespace InternshipSystem.Api.Test
private static JsonSerializerOptions options; private static JsonSerializerOptions options;
private static CasUserProfile result; 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<InternshipDbContext>()
.UseNpgsql("Host=localhost;Port=5432;Database=postgres;Username=postgres;Password=szwoniu")
.Options);
var e
};
}
} }