コード例 #1
0
        public void DeleteExample_ShouldReturn_NumberOfEntitiesDeleted()
        {
            var result = service.Delete(1);

            Assert.Multiple(() =>
            {
                repository.Verify(r => r.Delete(It.IsAny <long>()), Times.Once);
                Assert.NotZero(result);
            });
        }
コード例 #2
0
        public async Task <IActionResult> Delete(long id)
        {
            var service = new ExampleService(connString);
            var result  = await service.Delete(id);

            return(httpResult.Message(result.Code, result));
        }