public void GetEmployerFromRepository() { //Arrange const string edsUrn = "1234"; var repositoryEmployer = new Fixture().Create <Employer>(); repositoryEmployer.EdsUrn = edsUrn; _employerReadRepository.Reset(); _employerReadRepository.Setup(e => e.GetByEdsUrn(edsUrn, It.IsAny <bool>())).Returns(repositoryEmployer); _employerWriteRepository.Reset(); _organisationService.Reset(); //Act var employer = _strategy.Get(edsUrn); //Assert employer.Should().Be(repositoryEmployer); _organisationService.Verify(os => os.GetVerifiedOrganisationSummary(It.IsAny <string>()), Times.Never); _employerWriteRepository.Verify(r => r.Save(It.IsAny <Employer>()), Times.Never); }
public Employer GetEmployer(string edsUrn) { Condition.Requires(edsUrn).IsNotNullOrEmpty(); return(_getByEdsUrnStrategy.Get(edsUrn)); }