Ejemplo n.º 1
0
        public async void DeleteGlossaryThenSearchForIt()
        {
            var response = _service.Get("defamation");

            response.Result.Records.Count.Should().Be(1);
            response.Result.Records.First().Term.Should().Be("defamation");
            response.Result.Records.First().Text.Should().NotBeEmpty();
            _service.Delete("defamation");
            try
            {
                var response2 = await _service.Get("defamation");

                1.Should().Be(0);
            }
            catch (GlossaryException e)
            {
                e.Message.Should().Be("Glossary does not exist");
            }
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> DeleteConfirmed(Guid id)
        {
            await _glossaryService.Delete(id);

            return(RedirectToAction(nameof(Index)));
        }
Ejemplo n.º 3
0
        public ActionResult Remove(string terms)
        {
            _service.Delete(terms);

            return(Ok());
        }