public void ContactInfo_Delete_Test()
        {
            _contactInfoRepoMock.Setup(x => x.Get(1)).Returns(contactInfoFake);
            var result = _contactInfoControllerMock.Delete(1);

            Assert.IsTrue(((ObjectResult)result).Value.ToString().IndexOf("200") > 0);
        }
Exemple #2
0
        public void DeleteInfoTest()
        {
            DirectoryContext _directoryContext = new DirectoryContext();

            ContactInfoController infoController = new ContactInfoController(_directoryContext);
            ContactDeleteVM       model          = new ContactDeleteVM();


            var data = infoController.Delete(model);

            Assert.IsNotNull(model);
            Assert.IsNotNull(data);
        }