Exemple #1
0
 public DroneRepoTests()
 {
     _context             = Substitute.For <DataContext>();
     _droneStatusExecutor = Substitute.For <ICommandExecutor <DroneStatusResult> >();
     _statusDroneExecutor = Substitute.For <ICommandExecutor <StatusDroneDto> >();
     _droneRepository     = new DroneRepository(_context, _statusDroneExecutor, _droneStatusExecutor);
 }
        public DroneRepositoryTests()
        {
            _context = ContextProvider <Drone> .GetContext(SetupTests.GetDrones(1));

            _droneStatusExecutor = new CommandExecutorTest <DroneStatusResult>();
            _statusDroneExecutor = Substitute.For <ICommandExecutor <StatusDroneDto> >();
            _droneRepository     = new DroneRepository(_context, _statusDroneExecutor, _droneStatusExecutor);
        }
 public UnitOfWork(DtsContext context)
 {
     _context         = context;
     Drones           = new DroneRepository(_context);
     NavigationPoints = new NavigationRepository(_context);
     Scales           = new ScaleRepository(_context);
     Street           = new StreetRepository(_context);
     Statistics       = new StatisticsRepository(_context);
 }
Exemple #4
0
        public void RetornaDroneTests()
        {
            var droneTest = SetupTests.GetDrone();
            var context   = ContextProvider <felipe.DTO.Models.Drone> .GetContext(SetupTests.GetDrones());

            var droneRepository = new DroneRepository(context, _statusDroneExecutor, _droneStatusExecutor);
            var drone           = droneRepository.RetornaDrone();

            Assert.True(drone.Equals(droneTest));
        }
 public PedidoService(PedidoRepository pedidoRepository, DroneRepository droneRepository)
 {
     _pedidoRepository = pedidoRepository;
     _droneRepository  = droneRepository;
 }
 public RotinaService(DroneRepository droneRepository, PedidoRepository pedidoRepository)
 {
     _droneRepository  = droneRepository;
     _pedidoRepository = pedidoRepository;
 }