public void GetItemByID1(int itemID)
        {
            Items it = idal.GetItemByID(itemID);

            Assert.NotNull(it);
            Assert.Equal(itemID, it.ItemID);
        }
示例#2
0
        public Items GetItemByItemID(int?itemID)
        {
            Regex           regex           = new Regex("[0-9]");
            MatchCollection matchCollection = regex.Matches(itemID.ToString());

            if (itemID == null)
            {
                return(null);
            }
            else if (matchCollection.Count < itemID.ToString().Length)
            {
                return(null);
            }
            return(itDal.GetItemByID(itemID));
        }