public void SetUp() { _mockApprenticeshipRespository = new Mock <IApprenticeshipRepository>(); _handler = new GetApprenticeshipQueryHandler(_mockApprenticeshipRespository.Object, new GetApprenticeshipValidator()); var dataFixture = new Fixture(); _fakeRepositoryApprenticeship = dataFixture.Build <Apprenticeship>().Create(); _exampleValidRequest = new GetApprenticeshipRequest { Caller = new Caller { CallerType = CallerType.Employer, Id = _fakeRepositoryApprenticeship.EmployerAccountId }, ApprenticeshipId = _fakeRepositoryApprenticeship.Id }; }
public void Then_The_GetUrl_Is_Correctly_Built(long apprenticeshipId) { var actual = new GetApprenticeshipRequest(apprenticeshipId); actual.GetUrl.Should().Be($"api/apprenticeships/{apprenticeshipId}"); }