public async Task ShouldBeRemoveAnApplicant() { long developerId = FakerBuilder.New().Build().Random.Long(min: 1); _developerRepositoryMock.Setup(s => s.Remove(It.IsAny <long>())); await _developerService.RemoveAnApplicant(developerId); _developerRepositoryMock.Verify(s => s.Remove(It.Is <long>(id => id == developerId))); }
public AddresTests() { _faker = FakerBuilder.New().Build(); }
public DeveloperTests() { _faker = FakerBuilder.New().Build(); }
public async Task <long> ShouldBeApplyANewDeveloper() { _developerRepositoryMock.Setup(s => s.Insert(It.IsAny <Developer>())).ReturnsAsync(FakerBuilder.New().Build().Random.Long(0, 10)); var developerDto = _mapper.Map <DeveloperDto>(DeveloperFake.New().Build()); var newId = await _developerService.ApplyADeveloper(developerDto); newId.ShouldNotBe(0); _developerRepositoryMock.Verify(s => s.Insert(It.Is <Developer>(p => p.Email == developerDto.Email))); return(newId); }