public void GetNotExistingOrderByIdTest()
        {
            DBDAL dbdal = new DBDAL();
            Order order = dbdal.GetById(-345);

            Assert.IsNull(order);
        }
 public void GetExistingOrderByIdTest()
 {
     DBDAL dbdal = new DBDAL();
     Order order = dbdal.GetById(11048);
     Order actualorder = new Order();
     actualorder.ID = 11048;
     actualorder.CustomerID = "BOTTM";
     actualorder.EmployeeID = 7;
     actualorder.OrderDate = new DateTime(1998, 4, 24);
     actualorder.RequiredDate = new DateTime(1998, 5, 22);
     actualorder.ShippedDate = new DateTime(1998, 4, 30);
     actualorder.ShipVia = 3;
     actualorder.Freight = 24.12;
     actualorder.ShipName = "Bottom-Dollar Markets";
     actualorder.ShipAddress = "23 Tsawassen Blvd.";
     actualorder.ShipCity = "Tsawassen";
     actualorder.ShipRegion = "BC";
     actualorder.ShipPostalCode = "T2F 8M4";
     actualorder.ShipCountry = "Canada";
     actualorder.Details.Add(new OrderDetails(new Product(68, "Scottish Longbreads"), 12.50, 42, 0));
     actualorder.Status = OrderStatus.SHIPPED;
     Assert.AreEqual(order, actualorder);
 }
        public void GetExistingOrderByIdTest()
        {
            DBDAL dbdal       = new DBDAL();
            Order order       = dbdal.GetById(11048);
            Order actualorder = new Order();

            actualorder.ID             = 11048;
            actualorder.CustomerID     = "BOTTM";
            actualorder.EmployeeID     = 7;
            actualorder.OrderDate      = new DateTime(1998, 4, 24);
            actualorder.RequiredDate   = new DateTime(1998, 5, 22);
            actualorder.ShippedDate    = new DateTime(1998, 4, 30);
            actualorder.ShipVia        = 3;
            actualorder.Freight        = 24.12;
            actualorder.ShipName       = "Bottom-Dollar Markets";
            actualorder.ShipAddress    = "23 Tsawassen Blvd.";
            actualorder.ShipCity       = "Tsawassen";
            actualorder.ShipRegion     = "BC";
            actualorder.ShipPostalCode = "T2F 8M4";
            actualorder.ShipCountry    = "Canada";
            actualorder.Details.Add(new OrderDetails(new Product(68, "Scottish Longbreads"), 12.50, 42, 0));
            actualorder.Status = OrderStatus.SHIPPED;
            Assert.AreEqual(order, actualorder);
        }
 public void GetNotExistingOrderByIdTest()
 {
     DBDAL dbdal = new DBDAL();
     Order order = dbdal.GetById(-345);
     Assert.IsNull(order);
 }