Beispiel #1
0
        public async Task MakeaReservation()
        {
            //Arrange


            var BDName  = Guid.NewGuid().ToString();
            var context = BuildContext(BDName);


            //Act

            var newreservation = new CreateReservaViewModel()
            {
                Fecha           = "12/03/20",
                Hora            = "12:00",
                Observaciones   = "Color azul",
                VehiculoId      = 1,
                LocalId         = 1,
                ReservaEstadoId = 1,
            };

            var controller = new ReservasController(context);

            var response = await controller.Create(newreservation);

            var reservation = response.Result as StatusCodeResult;

            //Assert

            Assert.IsInstanceOf <OkResult>(reservation);
        }