Ejemplo n.º 1
0
        public void GetProgramRequest_WhenDatabaseThrowsError_ShouldThrowException()
        {
            //Arrange
            mockDataAccess
            .Setup(x => x.GetDataTable(
                       It.IsAny <string>(),
                       "prc_ISISProgramRequestGet",
                       It.IsAny <CommandType>(),
                       It.IsAny <SqlParameter[]>()))
            .Throws <Exception>();

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

            mockExceptionHandling.VerifyAll();
        }