コード例 #1
0
        public void ThisOrderStockOK()
        {
            //Create the instance of class
            clsStockCollection AllStock  = new clsStockCollection();
            clsStock           TestStock = new clsStock();

            TestStock.Active        = true;
            TestStock.StockId       = 1;
            TestStock.DateOfOrder   = DateTime.Now.Date;
            TestStock.ShipmentDate  = DateTime.Now.Date;
            TestStock.SupplierID    = 34;
            TestStock.NumberOfOrder = 46;
            TestStock.NumberShipped = 46;
            TestStock.Cost          = 1690;
            TestStock.Productname   = "Chocolate";
            AllStock.ThisOrder      = TestStock;
            Assert.AreEqual(AllStock.ThisOrder, TestStock);
        }
コード例 #2
0
        public void OrderListOK()
        {
            clsStockCollection AllStock = new clsStockCollection();
            List <clsStock>    TestList = new List <clsStock>();
            clsStock           TestItem = new clsStock();

            TestItem.Active        = true;
            TestItem.StockId       = 1;
            TestItem.DateOfOrder   = DateTime.Now.Date;
            TestItem.ShipmentDate  = DateTime.Now.Date;
            TestItem.SupplierID    = 34;
            TestItem.NumberOfOrder = 46;
            TestItem.NumberShipped = 46;
            TestItem.Cost          = 1690;
            TestItem.Productname   = "Chocolate";
            TestList.Add(TestItem);
            AllStock.StockList = TestList;
            Assert.AreEqual(AllStock.StockList, TestList);
        }
コード例 #3
0
ファイル: txtStock.cs プロジェクト: shreyareddy01/PhoneSystem
        public void DateAddedExtremeMax()
        {
            //create an instance of the class we want to create
            clsStock AnStock = new clsStock();
            //string variable to store any error message
            String Error = "";
            //create a variable to store the test date data
            DateTime TestDate;

            //set the date totodays date
            TestDate = DateTime.Now.Date;
            //change the date to whatever the date is less 100 years
            TestDate = TestDate.AddYears(-100);
            //convert the date variable to a string variable
            string DateAdded = TestDate.ToString();

            //invoke the method
            Error = AnStock.Valid(DateAdded);
            //test to see that the result is correct
            Assert.AreNotEqual(Error, "");
        }
コード例 #4
0
 internal void Add(clsStock testItem)
 {
     throw new NotImplementedException();
 }