Exemplo n.º 1
0
        public void Test_DeliveryServiceWrongTime()
        {
            ShoppingCart sc = new ShoppingCart();

            Good[] itemIDAndCount = new Good[3];
            for (int i = 0, count = itemIDAndCount.Length; i < count; ++i)
            {
                itemIDAndCount[i].ItemID = i + 1;
                itemIDAndCount[i].Count = 10;
            }

            string dateString = "5/1/2008 5:30:52 AM";
            DateTime time = DateTime.Parse(dateString, System.Globalization.CultureInfo.InvariantCulture);

            sc.createRequest(itemIDAndCount, time, 5);
        }
Exemplo n.º 2
0
        public void Test_DeliverySystemConfirmFail()
        {
            ShoppingCart sc = new ShoppingCart();

            Good[] itemIDAndCount = new Good[1];
            for (int i = 0, count = itemIDAndCount.Length; i < count; ++i)
            {
                itemIDAndCount[i].ItemID = i + 1;
                itemIDAndCount[i].Count = 5;
            }

            string dateString = "5/1/2008 5:01:52 PM";
            DateTime time = DateTime.Parse(dateString, System.Globalization.CultureInfo.InvariantCulture);

            sc.createRequest(itemIDAndCount, time, 7);
        }
Exemplo n.º 3
0
        public void Test_SupplierSystemGoodNotFound()
        {
            ShoppingCart sc = new ShoppingCart();

            Good[] itemIDAndCount = new Good[3];
            for (int i = 0, count = itemIDAndCount.Length; i < count; ++i)
            {
                itemIDAndCount[i].ItemID = 10;
                itemIDAndCount[i].Count = 5;
            }

            string dateString = "5/1/2008 5:30:52 PM";
            DateTime time = DateTime.Parse(dateString, System.Globalization.CultureInfo.InvariantCulture);

            sc.createRequest(itemIDAndCount, time, 2);
        }