Ejemplo n.º 1
0
 public async void GetAllProducts()
 {
     ProductsController controller = new ProductsController();
     var products = await controller.Get();
     Assert.That(products.Count(), Is.GreaterThan(9000));
     Assert.That(products.Single(p => p.Id == 904409).Name, Is.EqualTo("Molson Canadian"));
 }
Ejemplo n.º 2
0
 public async void GetProduct904409MolsonCanadian()
 {
     ProductsController controller = new ProductsController();
     var product = await controller.Get(904409);
     Assert.That(product.Name, Is.EqualTo("Molson Canadian"));
     Assert.That(product.Id, Is.EqualTo(904409));
     Assert.That(product.Container.ContainerCapacity, Is.EqualTo(473));
     Assert.That(product.Container.NumberOfContainers, Is.EqualTo(1));
 }