// Setup public TestTankRepository() { connection = new SqliteConnection("DataSource=:memory:"); connection.Open(); var options = new DbContextOptionsBuilder <RobotStoreContext>() .UseSqlite(connection).Options; context = new RobotStoreContext(options); context.Database.EnsureCreated(); repository = new TankRepository(context); }
public TankController(ITankRepository tankRepository, IMapper mapper, IPropertyMappingService propertyMappingService, IPropertyCheckerService propertyCheckerService) { _tankRepository = tankRepository ?? throw new ArgumentNullException(nameof(tankRepository)); _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper)); _propertyMappingService = propertyMappingService ?? throw new ArgumentNullException(nameof(propertyMappingService)); _propertyCheckerService = propertyCheckerService ?? throw new ArgumentNullException(nameof(propertyCheckerService)); }
public OldFactoryService() { _tankRepository = new TankRepository(); }
public TankService() { this._tankRepository = new TankRepository(); }