Skip to content

Commit

Permalink
Merge pull request #1019 from ita-social-projects/revert-955-integrat…
Browse files Browse the repository at this point in the history
…ion-tests-Streetcode-Update-valerii

Revert "Integration tests for Streetcode Update Controller"
  • Loading branch information
BohdanBybliv authored Jan 7, 2024
2 parents 2b1a678 + 793d4c0 commit 65ed037
Show file tree
Hide file tree
Showing 36 changed files with 157 additions and 1,758 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using FluentResults;
using MediatR;
using Microsoft.Extensions.Localization;
using Streetcode.BLL.DTO.Streetcode;
using Streetcode.BLL.Interfaces.Logging;
using Streetcode.BLL.MediatR.Streetcode.Streetcode.GetAllShort;
using Streetcode.BLL.SharedResource;
using Streetcode.DAL.Entities.Streetcode;
using Streetcode.DAL.Enums;
using Streetcode.DAL.Repositories.Interfaces.Base;

namespace Streetcode.BLL.MediatR.Streetcode.Streetcode.GetCount
Expand All @@ -26,17 +31,7 @@ public GetStreetcodesCountHander(IRepositoryWrapper repositoryWrapper, IMapper m

public async Task<Result<int>> Handle(GetStreetcodesCountQuery request, CancellationToken cancellationToken)
{
IEnumerable<StreetcodeContent> streetcodes;

if (request.onlyPublished)
{
streetcodes = await _repositoryWrapper.StreetcodeRepository
.GetAllAsync(s => s.Status == StreetcodeStatus.Published);
}
else
{
streetcodes = await _repositoryWrapper.StreetcodeRepository.GetAllAsync();
}
var streetcodes = await _repositoryWrapper.StreetcodeRepository.GetAllAsync();

if (streetcodes != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

namespace Streetcode.BLL.MediatR.Streetcode.Streetcode.GetCount
{
public record GetStreetcodesCountQuery(bool onlyPublished) : IRequest<Result<int>>;
public record GetStreetcodesCountQuery : IRequest<Result<int>>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class StreetcodeContent
public string? Teaser { get; set; }

[Required]
[MaxLength(100)]
[MaxLength(50)]
public string? DateString { get; set; }

[MaxLength(50)]
Expand Down
Loading

0 comments on commit 65ed037

Please sign in to comment.