Добавлен idDiscriminator в роут для интеграционных тестов + правка по результатам прогона тестов

This commit is contained in:
Olga Nemt 2024-12-06 16:19:42 +05:00
parent 2e567e7eba
commit 8d2a22a38f
2 changed files with 10 additions and 10 deletions

View File

@ -17,7 +17,7 @@ public interface IChangeLogClient
/// <param name="idDiscriminator"></param> /// <param name="idDiscriminator"></param>
/// <param name="dtos"></param> /// <param name="dtos"></param>
/// <returns></returns> /// <returns></returns>
[Post($"{BaseRoute}/replace")] [Post($"{BaseRoute}/replace/{{idDiscriminator}}")]
Task<IApiResponse<int>> ClearAndAddRange(Guid idDiscriminator, IEnumerable<DataWithWellDepthAndSectionDto> dtos); Task<IApiResponse<int>> ClearAndAddRange(Guid idDiscriminator, IEnumerable<DataWithWellDepthAndSectionDto> dtos);
/// <summary> /// <summary>
@ -28,7 +28,7 @@ public interface IChangeLogClient
/// <param name="filterRequest">параметры запроса фильтрации</param> /// <param name="filterRequest">параметры запроса фильтрации</param>
/// <param name="paginationRequest">параметры запроса пагинации</param> /// <param name="paginationRequest">параметры запроса пагинации</param>
/// <returns></returns> /// <returns></returns>
[Get($"{BaseRoute}/moment")] [Get($"{BaseRoute}/moment/{{idDiscriminator}}")]
Task<IApiResponse<PaginationContainer<DataWithWellDepthAndSectionDto>>> GetByDate( Task<IApiResponse<PaginationContainer<DataWithWellDepthAndSectionDto>>> GetByDate(
Guid idDiscriminator, Guid idDiscriminator,
DateTimeOffset moment, DateTimeOffset moment,
@ -42,7 +42,7 @@ public interface IChangeLogClient
/// <param name="dateBegin"></param> /// <param name="dateBegin"></param>
/// <param name="dateEnd"></param> /// <param name="dateEnd"></param>
/// <returns></returns> /// <returns></returns>
[Get($"{BaseRoute}/history")] [Get($"{BaseRoute}/history/{{idDiscriminator}}")]
Task<IApiResponse<IEnumerable<ChangeLogDto>>> GetChangeLogForInterval(Guid idDiscriminator, DateTimeOffset dateBegin, DateTimeOffset dateEnd); Task<IApiResponse<IEnumerable<ChangeLogDto>>> GetChangeLogForInterval(Guid idDiscriminator, DateTimeOffset dateBegin, DateTimeOffset dateEnd);
/// <summary> /// <summary>
@ -51,7 +51,7 @@ public interface IChangeLogClient
/// <param name="idDiscriminator"></param> /// <param name="idDiscriminator"></param>
/// <param name="dto"></param> /// <param name="dto"></param>
/// <returns></returns> /// <returns></returns>
[Post($"{BaseRoute}")] [Post($"{BaseRoute}/{{idDiscriminator}}")]
Task<IApiResponse<int>> Add(Guid idDiscriminator, DataWithWellDepthAndSectionDto dto); Task<IApiResponse<int>> Add(Guid idDiscriminator, DataWithWellDepthAndSectionDto dto);
/// <summary> /// <summary>
@ -60,7 +60,7 @@ public interface IChangeLogClient
/// <param name="idDiscriminator"></param> /// <param name="idDiscriminator"></param>
/// <param name="dtos"></param> /// <param name="dtos"></param>
/// <returns></returns> /// <returns></returns>
[Post($"{BaseRoute}/range")] [Post($"{BaseRoute}/range/{{idDiscriminator}}")]
Task<IApiResponse<int>> AddRange(Guid idDiscriminator, IEnumerable<DataWithWellDepthAndSectionDto> dtos); Task<IApiResponse<int>> AddRange(Guid idDiscriminator, IEnumerable<DataWithWellDepthAndSectionDto> dtos);
/// <summary> /// <summary>
@ -69,7 +69,7 @@ public interface IChangeLogClient
/// <param name="idDiscriminator"></param> /// <param name="idDiscriminator"></param>
/// <param name="dto"></param> /// <param name="dto"></param>
/// <returns></returns> /// <returns></returns>
[Put($"{BaseRoute}")] [Put($"{BaseRoute}/{{idDiscriminator}}")]
Task<IApiResponse<int>> Update(Guid idDiscriminator, DataWithWellDepthAndSectionDto dto); Task<IApiResponse<int>> Update(Guid idDiscriminator, DataWithWellDepthAndSectionDto dto);
/// <summary> /// <summary>
@ -78,7 +78,7 @@ public interface IChangeLogClient
/// <param name="idDiscriminator"></param> /// <param name="idDiscriminator"></param>
/// <param name="dtos"></param> /// <param name="dtos"></param>
/// <returns></returns> /// <returns></returns>
[Put($"{BaseRoute}/range")] [Put($"{BaseRoute}/range/{{idDiscriminator}}")]
Task<IApiResponse<int>> UpdateRange(Guid idDiscriminator, IEnumerable<DataWithWellDepthAndSectionDto> dtos); Task<IApiResponse<int>> UpdateRange(Guid idDiscriminator, IEnumerable<DataWithWellDepthAndSectionDto> dtos);
/// <summary> /// <summary>

View File

@ -35,7 +35,7 @@ public class ChangeLogRepository : IChangeLogRepository
{ {
var query = db.Set<ChangeLog>() var query = db.Set<ChangeLog>()
.Where(s => ids.Contains(s.Id)) .Where(s => ids.Contains(s.Id))
.Where(s => s.Obsolete != null); .Where(s => s.Obsolete == null);
if (query.Count() != ids.Count()) if (query.Count() != ids.Count())
{ {