Exemple #1
0
 public void Initialize()
 {
     _fixture    = new Fixture();
     _mockMapper = new Mock <IMapper>();
     _mockProductDetailsManager = new Mock <IProductDetailsManager>();
     _productDetailsService     = new ProductDetailsService(_mockProductDetailsManager.Object, _mockMapper.Object);
 }
Exemple #2
0
 public void Cleanup()
 {
     _fixture    = null;
     _mockMapper = null;
     _mockProductDetailsManager = null;
     _productDetailsService     = null;
 }
        public async Task GetProductDetails(int ID)
        {
            CartList = await App.DB.GetItemsAsync();

            var Uri = baseUri + ID + "/details";
            var productDetailsService = new ProductDetailsService();
            var details = await productDetailsService.GetProductsAsync(Uri);

            ProductDetails = new ProductDetailsModel()
            {
                ID            = details.ID,
                Name          = details.Manufacturer + " " + details.Model,
                Price         = details.Price + " zł",
                Processor     = details.Specs.Processor,
                RAM           = details.Specs.RAM + " GB",
                Max_RAM       = details.Specs.Max_RAM + " GB",
                Disk_size     = details.Specs.Disk_size + " GB",
                Disk_type     = details.Specs.Disk_type,
                Display_type  = details.Specs.Display_type,
                Display_size  = details.Specs.Display_size + "\"",
                Resolution    = details.Specs.Resolution,
                Graphics_card = details.Specs.Graphics_card,
                Battery       = details.Specs.Battery,
                OS            = details.Specs.OS,
                Height        = details.Specs.Height + " mm",
                Width         = details.Specs.Width + " mm",
                Depth         = details.Specs.Depth + " mm",
                Weight        = details.Specs.Weight + " kg",
                Warranty      = details.Specs.Warranty + " mies.",
                Images        = details.Images
            };
            IsBusy    = false;
            IsEnabled = true;
        }