コード例 #1
0
        public async Task RaceVehicle_Add_Success()
        {
            var raceVehicle = new RaceVehicle {
                RaceId = 2, VehicleId = 2, AcceptableLift = true, AcceptableTireWear = false, HasTowStrap = true
            };
            await _service.AddAsync(raceVehicle);

            Assert.IsTrue((await _service.GetAllAsync()).Where(x => x.RaceId == raceVehicle.RaceId && x.VehicleId == raceVehicle.VehicleId).FirstOrDefault() != null);
        }
コード例 #2
0
 // GET: RaceVehicles
 public async Task <IActionResult> Index()
 {
     return(View(await _service.GetAllAsync()));
 }