Exemple #1
0
        public void GetStatusCodes_WhenDatabaseThrowsError_ShouldThrowException()
        {
            //Arrange
            mockDataAccess
            .Setup(x => x.GetDataTable(
                       It.IsAny <string>(),
                       "prc_ISISStatusCodesGet",
                       It.IsAny <CommandType>(), null))
            .Throws <Exception>();

            //Act and Assert
            Assert.Throws <Exception>(() => programRequest.GetStatusCodes());

            mockExceptionHandling.VerifyAll();
        }