/// <summary>
        /// Jory A. Wernette
        /// Created: 2021/05/10
        ///
        /// An abstract method for editing a collection.
        /// </summary>
        ///
        ///<param name="collectionID">The Collection record ID to be updated</param>
        ///<param name="cardLocation">The new location for the collection record</param>
        ///<param name="oldLocation">The old location record to be overwritten</param>
        ///<exception></exception>
        ///<returns>Bool denoting success or failure</returns>
        public bool EditACardInMyCollection(int collectionID, string cardLocation, string oldLocation)
        {
            bool result = false;

            try
            {
                result = collectionAccessor.EditACardInMyCollection(collectionID, cardLocation, oldLocation);
            }
            catch (Exception ex)
            {
                throw new ApplicationException("Collection Not Available.", ex);
            }

            return(result);
        }
Example #2
0
        public void TestEditACardInMyCollection()
        {
            //Arrange
            int    collectionID   = 1;
            string cardLocation   = "Collector's Binder";
            string oldLocation    = "Blue-Eyes Deck";
            bool   expectedResult = true;

            //Act
            bool actualResult = false;

            actualResult = collectionAccessor.EditACardInMyCollection(collectionID, cardLocation, oldLocation);

            //Assert
            Assert.AreEqual(expectedResult, actualResult);
        }