Esempio n. 1
0
        public void GetCpuById_WithIdMatchingCpu_ShouldReturnCorrectCpu()
        {
            SetUp();

            SeedData();
            var cpu = _cpuService.GetCpuById(1);

            Assert.True(cpu != null);
        }
Esempio n. 2
0
        // 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));
        }