public async Task GetAll_ReturnValueEqualsExpected_Success() { var expected = GetTestData(); var value = expected.Select(x => _mapper.Map <Processing>(x)); _processingRepositoryMock.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); }
public async Task <IEnumerable <ProcessingDto> > GetAll() { return(await _service.GetAll()); }