示例#1
0
        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)));
        }
示例#2
0
 public AddresTests()
 {
     _faker = FakerBuilder.New().Build();
 }
示例#3
0
 public DeveloperTests()
 {
     _faker = FakerBuilder.New().Build();
 }
示例#4
0
        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);
        }