Skip to content

Commit

Permalink
FAT2-295 - Add request for getting provider by id
Browse files Browse the repository at this point in the history
  • Loading branch information
dashton82 committed Dec 24, 2020
1 parent 5d25d8f commit bf9c5c6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using AutoFixture.NUnit3;
using FluentAssertions;
using NUnit.Framework;
using SFA.DAS.EmployerFinance.Infrastructure.OuterApiRequests;

namespace SFA.DAS.EmployerFinance.UnitTests.Infrastructure.OuterApiRequests
{
public class WhenBuildingTheGetProviderByIdRequest
{
[Test, AutoData]
public void Then_The_Url_Is_Correctly_Constructed(int id)
{
//Arrange
var actual = new GetProviderRequest(id);

//Act
actual.GetUrl.Should().Be($"providers/{id}");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using SFA.DAS.EmployerFinance.Interfaces.OuterApi;

namespace SFA.DAS.EmployerFinance.Infrastructure.OuterApiRequests
{
public class GetProviderRequest : IGetApiRequest
{
private readonly int _id;

public GetProviderRequest (int id)
{
_id = id;
}
public string GetUrl => $"providers/{_id}";
}
}

0 comments on commit bf9c5c6

Please sign in to comment.