public void GetApiBasic()
        {
            // Arrange
            double testLatitude = 37.3475;
            double testLongitude = -122.7865;
            int testLimit = 10;
            FoodTruckController controller = new FoodTruckController();

            // Act
            var result = controller.Index(testLatitude, testLongitude, testLimit);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(testLimit, result.Count);

            result = controller.Index(testLatitude, testLongitude, 1);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(1, result.Count);

            // Check default "limit" behavior, i.e., 50
            result = controller.Index(testLatitude, testLongitude);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(50, result.Count);
        }
        public void GetApiInvalid()
        {
            // Arrange
            FoodTruckController controller = new FoodTruckController();

            // Act
            var result = controller.Index(0, 0, -1);

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(0, result.Count);
        }
        public void GetApiApprovedTrucks()
        {
            var rep = new FoodTruckRepository();
            var allTrucks = rep.GetAllFoodTrucks();

            // Arrange
            double testLatitude = 37.7833;
            double testLongitude = -122.4167;
            FoodTruckController controller = new FoodTruckController();

            // Act - get ALL approved trucks with a valid location
            var allApproved = controller.Index(testLatitude, testLongitude, allTrucks.Count());
            var numApprovedExpected = allTrucks.Where(x => x.Status.Equals("APPROVED") && x.Latitude != 0.0 && x.Longitude != 0.0).Count();

            // Assert
            Assert.IsNotNull(allApproved);
            Assert.AreEqual(numApprovedExpected, allApproved.Count);
        }