public async Task GetAllOthersReturnsNotNullAndNotEmpty() { _repository = new OtherRepository(); var controller = new OtherController(_service); var others = await controller.GetOthers(); Assert.NotNull(others); Assert.True(others.Others.Any()); }
public void Init() { TestUtil.DeleteDataInDatabase(); TestUtil.InsertDataDatabase(); AutoMapperConfiguration.Configure(); _repository = new OtherRepository(); _context = new MicrobrewitContext(); _otherElasticsearch = new OtherElasticsearch(); _service = new OtherService(_otherElasticsearch,_repository); _controller = new OtherController(_service); }