예제 #1
0
        public void TestRetreiveAllAwards()
        {
            // Arrange
            const int    expectedCount = 4;
            int          actualCount;
            List <Award> award;

            // Act
            award       = awardAccessor.SelectAllAwards();
            actualCount = award.Count;

            // Assert
            Assert.AreEqual(expectedCount, actualCount);
        }
예제 #2
0
        /// <summary>
        /// Nathaniel Webber
        /// Created: 2021/03/10
        ///
        /// This method grabs the corresponding stored procedure from the sql
        /// and uses it to retreive all awards in the database
        /// </summary>
        public List <Award> RetreiveAllAwards(bool active = true)
        {
            List <Award> awards;

            try
            {
                awards = _awardAccessor.SelectAllAwards(active);
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Awards not found" + ex.InnerException);
            }

            return(awards);
        }