public async Task GetAll_ReturnValueEqualsExpected_Success() { var expected = GetTestData(); var value = expected.Select(x => _mapper.Map <AttitudeTo>(x)); _attitudeRepositoryMock.Setup(x => x.GetAllAsync()).ReturnsAsync(value); var actual = await _service.GetAllAttitudes(); var expectedSer = JsonConvert.SerializeObject(expected); var actualSer = JsonConvert.SerializeObject(actual); Assert.AreEqual(expectedSer, actualSer); }
public async Task <IEnumerable <AttitudeToDto> > GetAttitudes() { return(await _attitudeToService.GetAllAttitudes()); }