Beispiel #1
0
        public void AbusedProcedure()
        {
            var shoppingService = new ShoppingService();

            // This will throw an exception because we didn't call BeginTransaction first
            shoppingService.AddToCart(1, 2, 3);
        }
Beispiel #2
0
            public void DoSomeStuff()
            {
                var shoppingService = new ShoppingService(new CartTransaction {
                    TransactionUri = "http://www.google.com"
                });

                shoppingService.AddToCart(1, 2, 3);
            }
Beispiel #3
0
        public void ExpectedProcedure()
        {
            var shoppingService = new ShoppingService();

            shoppingService.BeginTransaction(new CartTransaction {
                TransactionUri = "http://google.com/"
            });
            shoppingService.AddToCart(1, 2, 3);
        }