public void GetCpuById_WithIdMatchingCpu_ShouldReturnCorrectCpu() { SetUp(); SeedData(); var cpu = _cpuService.GetCpuById(1); Assert.True(cpu != null); }
// GET: Cpus/Details/5 public IActionResult Details(int?id) { if (id == null) { return(NotFound()); } var cpu = _service.GetCpuById(id); if (cpu == null) { return(NotFound()); } return(View(cpu)); }