Exemplo n.º 1
0
        public async Task GetAll_ResultValueEqualsExpected_Success()
        {
            var expected = GetTestData();
            var value    = expected.Select(x => _mapper.Map <Vaccination>(x));

            _vaccinationRepositoryMock.Setup(x => x.GetAllAsync()).ReturnsAsync(value);

            var actual = await _service.GetAll();

            var expectedSer = JsonConvert.SerializeObject(expected);
            var actualSer   = JsonConvert.SerializeObject(actual);

            Assert.AreEqual(expectedSer, actualSer);
        }
Exemplo n.º 2
0
 public async Task <IEnumerable <VaccinationDto> > GetAll()
 {
     return(await _service.GetAll());
 }