Example #1
0
        public void TestMethodParameters()
        {
            ParkPlace parkPlace = new ParkPlace();

            Parking  parking  = new Parking();
            Building building = new Building();

            parking.Name = "ParkingYouri";

            building.Place       = "B blok";
            building.Description = "Mooi gebouw";
            building.Location    = "B202";


            parkPlace.Parking     = parking;
            parkPlace.Building    = building;
            parkPlace.Row         = 10;
            parkPlace.Cel         = 1;
            parkPlace.Description = "Hello world";


            Assert.AreEqual(parking, parkPlace.Parking);
            Assert.AreEqual(building, parkPlace.Building);
            Assert.AreEqual(10, parkPlace.Row);
            Assert.AreEqual(1, parkPlace.Cel);
            Assert.AreEqual("Hello world", parkPlace.Description);
        }
Example #2
0
        public void TestMethodGetMostReservedParkingPlace()
        {
            ReservationDataService ds = new ReservationDataService();

            ParkPlace parkplace = ds.GetMostReservedParkingPlace();

            Assert.AreEqual(4, 4);
        }
Example #3
0
        public void TestMethodGetParkPlaceWithFK()
        {
            ParkPlace park = new ParkPlace();

            park.Id = 2;
            ParkPlaceDataService db = new ParkPlaceDataService();

            ParkPlace newpark = db.GetParkPlaceWithFKView(park);

            Assert.AreEqual(2, newpark.Id);
        }
Example #4
0
        public void TestMethodGetReservationParkPlace()
        {
            ParkPlace parkplace = new ParkPlace();

            parkplace.Id = 2;

            ReservationDataService ds = new ReservationDataService();

            ObservableCollection <Reservation> reservations = ds.GetReservationParkPlace(parkplace);

            Assert.AreEqual(3, reservations.Count);
        }
        private void NewForm()
        {
            //new reserveren
            User      user      = new User();
            ParkPlace parkPlace = new ParkPlace();

            Reservation = new Reservation();

            Reservation.User      = user;
            Reservation.ParkPlace = parkPlace;
            Reservation.BeginTime = DateTime.Now;
            Reservation.EndTime   = DateTime.Now;
            Location = "";
        }
Example #6
0
        public void TestMethodGetNewParkPlaces()
        {
            Reservation reservation = new Reservation();

            ReservationDataService ds = new ReservationDataService();

            reservation.BeginTime = DateTime.Parse("05/04/2020 11:50:00");
            reservation.EndTime   = DateTime.Parse("05/04/2020 12:50:00");
            String location = "A202";

            ParkPlace park = ds.GetNewParkPlaces(reservation, location);

            Assert.AreEqual(16, park.Id);
        }
        private void GetParkingPlace()
        {
            //kijken welke paringPlaats
            ReservationDataService ds = new ReservationDataService();
            ParkPlace reservationPark = ds.GetNewParkPlaces(Reservation, Location);

            if (reservationPark == null)
            {
                //geen parking gevonden
                MessageBox.Show("Geen parkingplaatsen gevonden!");
            }
            else
            {
                Reservation.ParkPlace = reservationPark;
            }
        }