public void GetAllLinksExceptionTest() { _helpRepoMock.Setup(x => x.GetAllLinks()).Throws <Exception>(); var response = _helpService.GetAllLinks(); _mapperMock.Verify(x => x.Map <IList <HelpLinkDto> >(It.IsAny <IList <HelpLink> >()), Times.Never); Assert.IsNotNull(response); Assert.AreEqual(ResponseCode.ServerError, response.Code); Assert.IsNotEmpty(response.ErrorMessage); Assert.IsNull(response.Entity); }