public void GetAllStations() { EmptyLists(); stationVerbindingRepository = new PerronRepository(context); Assert.Equal(2, stationVerbindingRepository.GetAllPerrons().Count); }
public void UpdateStation() { EmptyLists(); stationVerbindingRepository = new PerronRepository(context); Perron perron = new Perron(1, "xx", true); Assert.True(stationVerbindingRepository.UpdatePerron(perron)); }
public void DeletePerron() { EmptyLists(); stationVerbindingRepository = new PerronRepository(context); Perron perron = new Perron(1, "naam", false); Assert.True(stationVerbindingRepository.DeletePerron(perron.Id)); }
public PerronController(IConfiguration configuration) { context = new MSSQLPerronContext(configuration.GetConnectionString("DefaultConnection")); stationContext = new MSSQLStationContext(configuration.GetConnectionString("DefaultConnection")); repo = new PerronRepository(context); stationRepo = new StationRepository(stationContext); converter = new PerronViewModelConverter(); stationConverter = new StationViewModelConverter(); }
public void GetStationbyId() { EmptyLists(); stationVerbindingRepository = new PerronRepository(context); Perron perron = new Perron(2, "naam", true); Assert.Equal(perron.Id, stationVerbindingRepository.GetPerronbyId(2).Id); Assert.Equal(perron.Naam, stationVerbindingRepository.GetPerronbyId(2).Naam); Assert.Equal(perron.Actief, stationVerbindingRepository.GetPerronbyId(2).Actief); }
public void CreateStation() { EmptyLists(); stationVerbindingRepository = new PerronRepository(context); Perron perron = new Perron(4, "naam", false); Assert.Equal(4, stationVerbindingRepository.CreatePerron(perron)); }