def testProcessRetrievedInventory():
	print(sys._getframe().f_code.co_name + ": ")

	dbConnect = DbConnect(InventoryDAO.getDbDir())
	connector = dbConnect.getConnection()

	customerId = 1
	barcode = 1
	quantity = 2

	androidService = AndroidService()
	inventoryReservation = androidService.reserveInventoryIfAvailable(customerId, barcode, quantity)
	print(inventoryReservation) # (True, reservedInventoryLoc, newVirtualCartRowId)


	arduinoService = ArduinoService()
	print( arduinoService.processRetrievedInventory(1, 1) )

	inventoryDAO = InventoryDAO(connector)
	print( inventoryDAO.selectAllEntries() )

	virtualCartDAO = VirtualCartDAO(connector)
	print( virtualCartDAO.selectAllEntries() )

	print("===================================================")
	print("Testing testProcessRetrievedInventory-------------------complete\n\n\n")
def populateInventoryInfo():

	print(sys._getframe().f_code.co_name + ": ")

	dao = InventoryDAO(gc_connector)

	entries = [
				(1, 0, 0, 50, 0, 0),
				(2, 0, 1, 50, 20, 0),
				(3, 0, 2, 50, 40, 0),
				(4, 0, 3, 50, 60, 0),
				(5, 1, 0, 100, 0, 0),
				(1, 1, 1, 100, 20, 0),
				(2, 2, 0, 150, 0, 0),
				(3, 2, 1, 150, 20, 0),
				(4, 2, 2, 150, 40, 0),
				(5, 2, 3, 150, 60, 0),
				(1, 2, 4, 150, 80, 0),
				(2, 2, 5, 150, 100, 0)
			  ]

	for entry in entries:
		dao.createAnEntry(entry)

	print(dao.selectAllEntries())

	print("===================================================")
	print("Testing populateInventoryInfo-------------------complete\n\n\n")
def populateInventoryInfo():

	print(sys._getframe().f_code.co_name + ": ")

	dao = InventoryDAO(gc_connector)

	entries = [
			  ]

	for entry in entries:
		dao.createAnEntry(entry)

	print(dao.selectAllEntries())

	print("===================================================")
	print("Testing populateInventoryInfo-------------------complete\n\n\n")
def testDepositInventory():
	print(sys._getframe().f_code.co_name + ": ")

	dbConnect = DbConnect(InventoryDAO.getDbDir())
	connector = dbConnect.getConnection()

	arduinoService = ArduinoService()

	[newXIdx, newYIdx, newXEncoder, newYEncoder] = arduinoService.getDepositLocation()
	print([newXIdx, newYIdx, newXEncoder, newYEncoder])

	arduinoService.depositInventory(5, newXIdx, newYIdx, newXEncoder, newYEncoder)

	inventoryDAO = InventoryDAO(connector)
	print(inventoryDAO.selectAllEntries())

	print("===================================================")
	print("Testing testDepositInventory-------------------complete\n\n\n")