Пример #1
0
        public void GetLaptopFromDatabase()
        {
            TestLaptopProvider laptopProvider = new TestLaptopProvider(mockLaptopContext.Object);
            Laptop             laptop         = new Laptop()
            {
                model    = "12311",
                code     = 1235,
                DiscSize = 1,
                price    = 100,
                ram      = 1,
                screen   = 1,
                speed    = 1
            };

            laptops.Add(laptop);

            var result = laptopProvider.GetLaptop(1235);

            Assert.NotNull(result);
            Assert.AreEqual(result, laptop);
        }
Пример #2
0
 public Laptop GetLaptop([FromUri] int code)
 {
     return(laptopProvider.GetLaptop(code));
 }