Beispiel #1
0
        public void GetDCNs_WhenDatabaseThrowsError_ShouldThrowException()
        {
            //Arrange
            mockDataAccess
            .Setup(x => x.GetDataTable(
                       It.IsAny <string>(),
                       "prc_ISISDCNsGet",
                       It.IsAny <CommandType>(),
                       It.IsAny <SqlParameter[]>()))
            .Throws <Exception>();

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

            mockExceptionHandling.VerifyAll();
        }