Example #1
0
        public void TestRetreiveAwardByAwardID()
        {
            // Arrange
            int          awardID       = 1;
            const int    expectedCount = 4;
            int          actualCount;
            List <Award> award;

            // Act
            award       = awardAccessor.SelectAwardByAwardID(awardID);
            actualCount = award.Count;

            // Assert
            Assert.AreEqual(expectedCount, actualCount);
        }
Example #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 of a specific users awards in the database
        /// </summary>
        public List <Award> RetreiveAwardByAwardID(int awardID)
        {
            List <Award> awards;

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

            return(awards);
        }