Beispiel #1
0
        public void WhenBuscarElCarro()
        {
            _car = new Car();
            var carDomainService = new CarDomainService();

            _resultado = carDomainService.GetCarDomainService(_car);
        }
Beispiel #2
0
        public void WhenPostearElCarroConModeloVacio()
        {
            _brand     = new Brand();
            _car       = new Car();
            _photo     = new Photo();
            _status    = new Status();
            _seller    = new Seller();
            _condition = new Condition();

            var purchase         = new Purchase(_car, _model, _photo, _status, _seller, _condition);
            var carDomainService = new CarDomainService();

            _resultado = carDomainService.PostCarDomainService(purchase);
        }
Beispiel #3
0
        public void WhenActualizarElCarro()
        {
            _brand     = new Brand();
            _model     = new Model();
            _photo     = new Photo();
            _status    = new Status();
            _seller    = new Seller();
            _condition = new Condition();

            var purchase         = new Purchase(_car, _model, _photo, _status, _seller, _condition);
            var carDomainService = new CarDomainService();

            _resultado = carDomainService.PutCarDomainService(id, purchase);
        }
Beispiel #4
0
        public void PruebaParaValidarQueSeEncuentraUnCarro()
        {
            // Arrange
            var car = new Car();
            var id  = new int();

            car = null;
            //   var purchase = new Purchase(model, brand);

            // Act
            var carDomainService = new CarDomainService();
            var resultado        = carDomainService.GetCarDomainService(car);

            // Assert
            Assert.AreEqual("No se Encontro el Vehiculo", resultado);
        }
Beispiel #5
0
        public void PruebaParaValidarQueSeEncuentraUnAñodelCarro2()
        {
            // Arrange
            var model     = new Model();
            var brand     = new Brand();
            var car       = new Car();
            var photo     = new Photo();
            var status    = new Status();
            var seller    = new Seller();
            var condition = new Condition();
            var id        = new int();

            car.Year = 1990;
            var purchase = new Purchase(car, model, photo, status, seller, condition);
            // Act
            var carDomainService = new CarDomainService();
            var resultado        = carDomainService.PutCarDomainService(id, purchase);

            // Assert
            Assert.AreEqual("El vehiculo debe ser año 1990 en adelante", resultado);
        }
Beispiel #6
0
        public void PruebaParaValidarQueSeEncuentraUnStatus()
        {
            // Arrange
            var model     = new Model();
            var brand     = new Brand();
            var car       = new Car();
            var photo     = new Photo();
            var status    = new Status();
            var seller    = new Seller();
            var condition = new Condition();
            var id        = new int();

            status = null;
            var purchase = new Purchase(car, model, photo, status, seller, condition);

            // Act
            var carDomainService = new CarDomainService();
            var resultado        = carDomainService.PostCarDomainService(purchase);

            // Assert
            Assert.AreEqual("El Estado no existe", resultado);
        }
Beispiel #7
0
        public void PruebaParaValidarQueSeEncuentraUnCarro3()
        {
            // Arrange
            var model     = new Model();
            var brand     = new Brand();
            var car       = new Car();
            var photo     = new Photo();
            var status    = new Status();
            var seller    = new Seller();
            var condition = new Condition();
            var id        = new int();

            car = null;
            var purchase = new Purchase(car, model, photo, status, seller, condition);

            // Act
            var carDomainService = new CarDomainService();
            var resultado        = carDomainService.DeleteCarDomainService(id, car);

            // Assert
            Assert.AreEqual("No se encuentra el Vehiculo", resultado);
        }
Beispiel #8
0
        public void PruebaParaValidarQueSeEncuentraUnaPhoto2()
        {
            // Arrange
            var model     = new Model();
            var brand     = new Brand();
            var car       = new Car();
            var photo     = new Photo();
            var status    = new Status();
            var seller    = new Seller();
            var condition = new Condition();
            var id        = new int();

            photo = null;
            var purchase = new Purchase(car, model, photo, status, seller, condition);

            // Act
            var carDomainService = new CarDomainService();
            var resultado        = carDomainService.PutCarDomainService(id, purchase);

            // Assert
            Assert.AreEqual("Estas fotografias no estan registradas", resultado);
        }
Beispiel #9
0
        public void WhenEliminarElCarro()
        {
            var carDomainService = new CarDomainService();

            _resultado = carDomainService.DeleteCarDomainService(id, _car);
        }
 public CarAppService(CarToGoDataContext _context, CarDomainService carDomainService)
 {
     _dataBase         = _context;
     _carDomainService = carDomainService;
 }