Пример #1
0
        public void GetProgramRequestDiagnoses_WhenDatabaseThrowsError_ShouldThrowException()
        {
            //Arrange
            mockDataAccess
            .Setup(x => x.GetDataTable(
                       It.IsAny <string>(),
                       "prc_ISISProgramRequestDiagnosesGet",
                       It.IsAny <CommandType>(),
                       It.IsAny <SqlParameter[]>()))
            .Throws <Exception>();

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

            mockExceptionHandling.VerifyAll();
        }