Ejemplo n.º 1
0
        public async void Test4()
        {
            ViewParticularProduct viewProduct = new ViewParticularProduct();
            await viewProduct.GetAProductsByID("P101");

            var product = ViewParticularProduct.selectedProduct;

            Assert.NotNull(product);
        }
Ejemplo n.º 2
0
        private async void ViewButton_Click(object sender, RoutedEventArgs e)
        {
            ViewParticularProduct product = new ViewParticularProduct();
            await product.GetAProductsByID(productIdSelected);

            Products          productSelected = ViewParticularProduct.selectedProduct;
            ProductViewWindow viewWindow      = new ProductViewWindow(productSelected);

            viewWindow.Show();
            this.Close();
        }
Ejemplo n.º 3
0
        public async void Test5()
        {
            ViewParticularProduct viewProduct = new ViewParticularProduct();
            await viewProduct.GetAProductsByID("P155");

            var      product               = ViewParticularProduct.selectedProduct;
            var      serializedProduct     = JsonConvert.SerializeObject(product);
            Products nullProduct           = new Products();
            var      serializedNullProduct = JsonConvert.SerializeObject(nullProduct);

            Assert.Equal(serializedNullProduct, serializedProduct);
        }