コード例 #1
0
        public void GetInvestments()
        {
            CreateFakeInvestmentContext();

            InvestmentController controller = new InvestmentController(db);

            // get all of the investments
            List <Investment> investments = controller.Get();

            // Asserts
            Assert.IsNotNull(investments);
        }
コード例 #2
0
        public void GetInvestmentsForUser()
        {
            CreateFakeInvestmentContext();

            InvestmentController controller = new InvestmentController(db);

            // get the investments for userId = 1
            List <Investment> investments = controller.Get(1);

            // Asserts
            Assert.IsNotNull(investments);
            Assert.AreEqual(2, investments.Count());
        }