public void SearchByTitle_ExpectNone()
        {
            string             gibberish = "aergergvdasc";
            Mock <IAuctionDao> mockDao   = new Mock <IAuctionDao>();

            mockDao.Setup(dao => dao.SearchByTitle(gibberish));
            AuctionsController controller = new AuctionsController(mockDao.Object);

            //IEnumerable<Auction> actual = controller.List(gibberish);

            //because parameters will be added to this method, we will need to try with different amounts of parameters
            object actual = SafeReflection.InvokeMethod(controller, "List", new object[] { gibberish, 0 });

            if (actual == null)
            {
                actual = SafeReflection.InvokeMethod(controller, "List", new object[] { gibberish });
            }

            //if this assertion fails, parameter has not yet been added to method. Need this test because `actual` will be null if parameter doesn't exist and give a false positive
            Assert.IsTrue(SafeReflection.HasMethodWithParameters(controller.GetType(), "List", new Dictionary <string, Type>()
            {
                { "title_like", typeof(string) }
            }));

            Assert.IsNull(actual);
        }
        public void GetMethod_NonExistentAuction_ExpectNull()
        {
            Mock <IAuctionDao> mockDao = new Mock <IAuctionDao>();

            mockDao.Setup(dao => dao.Get(It.IsAny <int>()));
            AuctionsController controller = new AuctionsController(mockDao.Object);

            //Auction actual = controller.Get(23);

            object actual = SafeReflection.InvokeMethod(controller, "Get", new object[] { 23 });

            //if this assertion fails, method or parameter has not yet been added. Need this test because `actual` will be null if method or parameter doesn't exist, and give a false positive
            Assert.IsTrue(SafeReflection.HasMethodWithParameterTypes(controller.GetType(), "Get", new Type[] { typeof(int) }));

            Assert.IsNull(actual);
        }
        public void SearchByPrice_ExpectNone()
        {
            Mock <IAuctionDao> mockDao = new Mock <IAuctionDao>();

            mockDao.Setup(dao => dao.SearchByPrice(0.01));
            AuctionsController controller = new AuctionsController(mockDao.Object);

            //List<Auction> actual = controller.List(currentBid_lte: 0.01);

            object actual = SafeReflection.InvokeMethod(controller, "List", new object[] { null, 0.01 });

            //if this assertion fails, parameter has not yet been added to method. Need this test because `actual` will be null if parameter doesn't exist and give a false positive
            Assert.IsTrue(SafeReflection.HasMethodWithParameters(controller.GetType(), "List", new Dictionary <string, Type>()
            {
                { "currentBid_lte", typeof(double) }
            }));

            Assert.IsNull(actual);
        }