Example #1
0
        public void Shop_Generic_AddFiveRandomProductsInRandomQuantity_CheckThatInCartIsTheSameContentAsWeExpected()
        {
            const int quantityOfProductsToAdd = 5;
            var       expectedOrder           = new OrderDetails();

            for (var i = 0; i < quantityOfProductsToAdd; i++)
            {
                AddRandomProductToBasket(expectedOrder);
            }

            var actualOrder = new ShoppingCartPage(Driver)
                              .Go()
                              .ToOrder();

            actualOrder.Should().BeEquivalentTo(expectedOrder,
                                                options => options.IncludingNestedObjects());
        }