public void Delete() {
            // Arrange
            ValuesController controller = new ValuesController();

            // Act
            controller.Delete(5);

            // Assert
        }
Exemple #2
0
        public void Delete()
        {
            // Arrange
            ValuesController controller = new ValuesController(_mockSampleLogic.Object);

            // Act
            controller.Delete(5);

            // Assert
        }
        public void Delete()
        {
            // Disponer
            ValuesController controller = new ValuesController();

            // Actuar
            controller.Delete(5);

            // Declarar
        }
        public void Delete()
        {
            // Disposizione
            ValuesController controller = new ValuesController();

            // Azione
            controller.Delete(5);

            // Asserzione
        }
Exemple #5
0
        public void Delete()
        {
            // Anordnen
            ValuesController controller = new ValuesController();

            // Aktion ausführen
            controller.Delete(5);

            // Bestätigen
        }
        public void Delete()
        {
            // Arrange
            ValuesController controller = new ValuesController(GetMockService());

            // Act
            controller.Delete(5);

            // Assert
        }
        public void Delete()
        {
            // Düzenle
            ValuesController controller = new ValuesController();

            // Yap
            controller.Delete(5);

            // Onayla
        }
        public void Delete()
        {
            // 정렬
            ValuesController controller = new ValuesController();

            // 동작
            controller.Delete(5);

            // 어설션
        }
        public void Delete()
        {
            // 排列
            ValuesController controller = new ValuesController();

            // 作用
            controller.Delete(5);

            // 判斷提示
        }
        public void Delete()
        {
            // Arrange
            ValuesController controller = new ValuesController();

            // Act
            controller.Delete("*****@*****.**");

            // Assert
        }
Exemple #11
0
        public void Delete()
        {
            // Упорядочение
            ValuesController controller = new ValuesController();

            // Действие
            controller.Delete(5);

            // Утверждение
        }
Exemple #12
0
        public void Delete()
        {
            // Organizar
            ValuesController controller = new ValuesController();

            // Agir
            controller.Delete(5);

            // Declarar
        }
        public void Delete()
        {
            // 排列
            ValuesController controller = new ValuesController();

            // 作用
            controller.Delete(5);

            // 判斷提示
        }
        public void Delete()
        {
            // 排列
            ValuesController controller = new ValuesController();

            // 操作
            controller.Delete(5);

            // 断言
        }
Exemple #15
0
        public void Delete()
        {
            // Przygotowanie
            ValuesController controller = new ValuesController();

            // Wykonanie
            controller.Delete(5);

            // Sprawdzenie
        }
Exemple #16
0
        public void Delete()
        {
            // Réorganiser
            ValuesController controller = new ValuesController();

            // Agir
            controller.Delete(5);

            // Déclarer
        }
Exemple #17
0
        public void Delete()
        {
            // 排列
            ValuesController controller = new ValuesController();

            // 操作
            controller.Delete(5);

            // 断言
        }
        public void Delete()
        {
            // Réorganiser
            ValuesController controller = new ValuesController();

            // Agir
            controller.Delete(5);

            // Déclarer
        }
        public void Delete()
        {
            // Disposizione
            ValuesController controller = new ValuesController();

            // Azione
            controller.Delete(5);

            // Asserzione
        }
        public void Delete()
        {
            // 準備
            ValuesController controller = new ValuesController();

            // 実行
            controller.Delete(5);

            // アサート
        }
        public void Delete()
        {
            // Disponer
            ValuesController controller = new ValuesController();

            // Actuar
            controller.Delete(5);

            // Declarar
        }
        public void Delete()
        {
            // Упорядочение
            ValuesController controller = new ValuesController();

            // Действие
            controller.Delete(5);

            // Утверждение
        }
        public void Delete()
        {
            // Anordnen
            ValuesController controller = new ValuesController();

            // Aktion ausführen
            controller.Delete(5);

            // Bestätigen
        }
        public void Delete()
        {
            // 準備
            ValuesController controller = new ValuesController();

            // 実行
            controller.Delete(5);

            // アサート
        }
Exemple #25
0
        public void Delete()
        {
            // Arrange
            ValuesController controller = new ValuesController();

            // Act
            controller.Delete(5);

            // Assert
        }
        public void Delete()
        {
            // Arrange
            ValuesController controller = new ValuesController();
            int id = 5;
            // Act
            var result = controller.Delete(id);

            // Assert
            Assert.IsTrue(result == id.ToString());
        }
Exemple #27
0
        public void Delete_AddOneValueThenDeleteIt_GetReturnsEmptySquance()
        {
            var controller = new ValuesController();

            var postResult = controller.Post("1");

            controller.Delete(postResult);
            var result = controller.Get();

            Assert.AreEqual(0, result.Count());
        }
        public void Delete()
        {
            // Arrange
            var mock       = new Mock <IValuesProvider>();
            var controller = new ValuesController(mock.Object);

            // Act
            controller.Delete(5);

            // Assert
        }
        public async Task Delete_Invalid()
        {
            ValuesController controller = new ValuesController();

            var result = await controller.Delete(100);

            var actionResult = Assert.IsType <BadRequestObjectResult>(result);

            Assert.Equal(400, actionResult.StatusCode);

            Assert.IsType <ApplicationException>(actionResult.Value);
        }
Exemple #30
0
        public void Delete_WhenParamIsPassed_ShouldReturnNoContentStatusResponse(int id)
        {
            // Arrange
            var controller = new ValuesController();

            // Act
            var response = controller.Delete(id);

            // Assert
            response.Should().NotBeNull();
            response.Should().BeOfType <NoContentResult>();
        }
        public void DeleteById_Positive_ReturnsCreated()
        {
            var Drepo = new Mock <IKeepRepo>();
            int id    = 1;

            Drepo.Setup(d => d.DeleteNote(id)).Returns(true);
            ValuesController valuecontroller = new ValuesController(Drepo.Object);
            var result = valuecontroller.Delete(id);

            var okObject = result as ObjectResult;

            Assert.NotNull(okObject);
        }
Exemple #32
0
        public void TestDeleteOne()
        {
            var idao = Substitute.For <IDao>();

            Singleton.Instance.setIDao(idao);

            var controller = new ValuesController();

            controller.Get(1);

            controller.Delete(1);
            idao.Received(1).DeleteOne(Arg.Is(1));
        }
Exemple #33
0
        public void ValuesDeletTest()
        {
            using (var repo = new RepositoryMock())
            {
                Assert.AreEqual(0, repo.TimesCalled);

                var target = new ValuesController(repo);

                target.Delete(2);

                Assert.AreEqual(1, repo.TimesCalled);
            }
        }
Exemple #34
0
        public void Delete()
        {
            // 排列
            var controller = new ValuesController();
            int count      = controller.Get().Count();

            // 作用
            var result = controller.Delete(1);

            // 判斷提示
            Assert.IsInstanceOfType(result, typeof(OkResult));
            Assert.AreEqual(count - 1, controller.Get().Count());
        }
        public async Task Delete_Valid()
        {
            ValuesController controller = new ValuesController();

            var result = await controller.Delete(10);

            var actionResult = Assert.IsType <OkObjectResult>(result);

            Assert.Equal(200, actionResult.StatusCode);

            var model = Assert.IsAssignableFrom <int>(actionResult.Value);

            Assert.Equal(10, model);
        }
        public void DeleteTest()
        {
            PhoneBookContext _phonecontext    = new PhoneBookContext();
            ProducerConfig   _config          = new ProducerConfig();
            ValuesController valuesController = new ValuesController(_config, _phonecontext);

            var personDelete = new PersonDeleteDTO();

            //var id = personDelete.ID;

            var deletedperson = valuesController.Delete(personDelete);

            Assert.IsNotNull(deletedperson);
        }
Exemple #37
0
        public void Delete()
        {
            // Arrange
            ValuesController controller = new ValuesController();

            ApplicationHelper applicationHelper = new ApplicationHelper();
            var appToRemove     = applicationHelper.GetApplication(5).Result;
            var idOfAppToRemove = appToRemove.Id;

            // Act
            controller.Delete(5);

            // Assert
            Assert.AreEqual(applicationHelper.GetApplication(5).Id, idOfAppToRemove);
        }
Exemple #38
0
         public void Getdeleted_PositiveTest(){
                    IFunction F = new Function_op();
                    string title="";
            string dummy = "Data deleted from table"; // Arrange
            
            Mock<IFunction> MockRepository = new Mock<IFunction>(); // Removing Dependency
            MockRepository.Setup(d => d.remove_in(title)).Returns(true);
             ValuesController controller_m = new ValuesController(MockRepository.Object); 

            var dummy1 = controller_m.Delete(title);
             // dummy1 = ModelFromActionResult<SomeViewModelClass>(dummy1);
             var objresult = dummy1 as OkObjectResult;
            Assert.NotNull(objresult);
             var model = objresult.Value as string;
            Assert.Equal(dummy , model);
        }
Exemple #39
0
        public async Task Delete_ValidId_ReturnsNoContent()
        {
            // arrange
            var controller = new ValuesController(_valueService)
            {
                ControllerContext = new ControllerContext()
                {
                    HttpContext = _contextMock.Object
                }
            };

            // act
            var result = await controller.Delete(1);

            // assert
            Assert.IsInstanceOfType(result, typeof(NoContentResult));
        }
Exemple #40
0
        public void Delete()
        {
            int count = 0;

            ValuesController VC = new ValuesController();

            try
            {
                VC.Delete("bbb");
                count++;
            }
            catch
            {
            }

            Assert.AreEqual(count, 1);
        }