예제 #1
0
        public void Should_throw_notSuportedException_when_adding_an_item_into_a_validated_order()
        {
            OrderStatus orderStatus = new InprogressStatus();
            var         order       = new Order(orderStatus);

            order.NextStatus(new ValidateStatus());
            var product = new Ram(300, "16 Go");

            orderStatus.AddProduct(product);
        }
예제 #2
0
        public void Should_add_item_into_an_in_progress_order()
        {
            OrderStatus orderStatus = new InprogressStatus();
            var         product     = new Ram(300, "16 Go");

            orderStatus.AddProduct(product);


            Assert.IsTrue(orderStatus.products.Contains(product));
        }