Ejemplo n.º 1
0
        public async Task Delete_returns_a_NotFound()
        {
            var attendu = new Langue {
                Id = 1, Libelle = "fransais", Sigle = "fr"
            };

            _langueMock
            .Setup(x => x.RemoveAsync(attendu))
            .Returns(Task.FromResult(0));     // This makes me *so* happy...
            IHttpActionResult result = await _controller.DeleteLangue(attendu.Id);

            var notFound = result as NotFoundResult;

            // Assert.IsNotNull(notFound);
            _langueMock.Verify(x => x.RemoveAsync(attendu));
        }