public function test_getQueryToSelectCount()
 {
     $res = $this->_obj->getQueryToSelectCount();
     /** @var \Magento\Framework\App\ResourceConnection $resource */
     $resource = \Magento\Framework\App\ObjectManager::getInstance()->get(\Magento\Framework\App\ResourceConnection::class);
     $conn = $resource->getConnection();
     $data = $conn->fetchOne($res);
 }
 public function test_getSelectQuery()
 {
     /** === Setup Mocks === */
     // $result = $this->_conn->select();
     $mResult = $this->_mockDbSelect();
     $this->mConn->shouldReceive('select')->once()->andReturn($mResult);
     // $tblStock = [$asStock => $this->_resource->getTableName(Cfg::ENTITY_MAGE_CATALOGINVENTORY_STOCK)];
     // $tblWrhs = [$asWrhs => $this->_resource->getTableName(EntityWarehouse::ENTITY_NAME)];
     $this->mResource->shouldReceive('getTableName')->twice();
     // $result->from($tblStock, $cols);
     $mResult->shouldReceive('from', 'joinLeft');
     /** === Call and asserts  === */
     $this->obj->getQueryToSelect();
 }
 public function test_getQueryToSelectCount()
 {
     /** === Setup Mocks === */
     // $result = $this->_conn->select();
     $mQuery = $this->_mockDbSelect();
     $this->mConn->shouldReceive('select')->once()->andReturn($mQuery);
     // $tblWrhs = [$asWrhs => $this->_resource->getTableName(EntityWrhsLot::ENTITY_NAME)];
     // $tblOdoo = [$asOdoo => $this->_resource->getTableName(EntityLot::ENTITY_NAME)];
     $this->mResource->shouldReceive('getTableName')->twice();
     // $result->from($tblWrhs, $cols);
     $mQuery->shouldReceive('from')->once();
     // $result->joinLeft($tblOdoo, $on, $cols);
     $mQuery->shouldReceive('joinLeft')->once();
     /** === Call and asserts  === */
     $res = $this->obj->getQueryToSelectCount();
     $this->assertTrue($res instanceof \Magento\Framework\DB\Select);
 }
 /**
  * @expectedException \Exception
  */
 public function test_getQueryToSelectCount()
 {
     /** === Call and asserts  === */
     $this->obj->getQueryToSelectCount();
 }