Ejemplo n.º 1
0
        public async void CreateTest(WishDto toCreate, WishDto expected)
		{
		    var result = await _wishService.CreateAsync(toCreate);
            
            Assert.True(result.Id > 0);
		    expected.Id = result.Id;
			result.ShouldBeEquivalentTo(expected);
		}
Ejemplo n.º 2
0
 public async Task<WishDto> CreateAsync(WishDto dto)
 {
     var wish = _mapper.Map<Wish>(dto);
     wish = await _wishRepository.AddAsync(wish);
     await _wishRepository.SaveChangesAsync();
     await SendAlertAsync();
     return _mapper.Map<WishDto>(wish);
 }
Ejemplo n.º 3
0
        public async void GetTest(int wishId, WishDto expected)
		{
		    var result = await _wishService.GetAsync(wishId);

            result.ShouldBeEquivalentTo(expected);
		}