public void GetAll() { var iRepository = new SearchRepository.IndexRepository(); Task.Run(async() => { var list = await iRepository.GetAsync(); Assert.IsNotNull(list); }).GetAwaiter().GetResult(); }
public void Delete() { var iRepository = new SearchRepository.IndexRepository(); Task.Run(async() => { bool isSuccess = false; //get first if exists var firstIndex = await iRepository.GetAsync(); if (firstIndex.Count > 0) { isSuccess = await iRepository.DeleteAsync(firstIndex[0]); } Assert.AreEqual(true, isSuccess); }).GetAwaiter().GetResult(); }