Exemplo n.º 1
0
        public void GetAll()
        {
            var iRepository = new SearchRepository.IndexRepository();

            Task.Run(async() =>
            {
                var list = await iRepository.GetAsync();
                Assert.IsNotNull(list);
            }).GetAwaiter().GetResult();
        }
Exemplo n.º 2
0
        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();
        }