예제 #1
0
        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);
        }
예제 #2
0
 public async Task <IEnumerable <AttitudeToDto> > GetAttitudes()
 {
     return(await _attitudeToService.GetAllAttitudes());
 }