public void TestRetrieveItemsByActive() { // Arrange int rowsAffected = 0; List <Item> itemList = new List <Item>(); // Act itemList = _itemAccessor.getAllItemsByActive(true); rowsAffected = itemList.Count; // Assert Assert.AreEqual(5, rowsAffected); }
/// <summary> /// Creator: Dalton Reierson /// Created: 2020/03/09 /// Approver: Brandyn T. Coverdill /// Approver: Jesee Tomash /// /// The method that retrieves all items in inventory by active /// </summary> /// /// <remarks> /// Updated By: /// Updated: /// Update: /// </remarks> /// <param name="item"></param> public List <Item> retrieveItemsByActive(bool active) { List <Item> itemList = new List <Item>(); try { itemList = _itemAccessor.getAllItemsByActive(active); } catch (Exception ex) { throw new ApplicationException("Items not found.", ex); } return(itemList); }