language-extensions/python/test/src/PythonGetResultsTests.cpp
// Name: GetBooleanResultsTest
//
// Description:
//  Test GetResults with default script expecting an OutputDataSet of Boolean column data.
//
GetBooleanResultsTest
Description:
Test GetResults with default script expecting an OutputDataSet of Boolean column data.
GetBooleanResultsTest Description : Test GetResults with default script expecting an OutputDataSet of Boolean column data .
TEST_F(PythonExtensionApiTests, GetBooleanResultsTest)
	{
		InitializeSession(0,  parametersNumber
			(*m_booleanInfo).GetColumnsNumber(),
			m_scriptString);
		InitializeColumns<SQLCHAR, SQL_C_BIT>(m_booleanInfo.get());
		TestExecute<SQLCHAR, SQL_C_BIT>(
			ColumnInfo<SQLCHAR>::sm_rowsNumber,
			(*m_booleanInfo).m_dataSet.data(),
			(*m_booleanInfo).m_strLen_or_Ind.data(),
			(*m_booleanInfo).m_columnNames,
			false);   validate
		vector<void *> expectedReturnData = {  };
		expectedReturnData.push_back((m_booleanInfo->m_dataSet[0]));
		string result = "TrueTrueFalse";
		expectedReturnData.push_back(const_cast<char*>(result.c_str()));
		TestGetResults<SQLCHAR, bool, SQL_C_BIT>(
			ColumnInfo<SQLCHAR>::sm_rowsNumber,
			expectedReturnData.data(),
			(*m_booleanInfo).m_strLen_or_Ind.data(),
			(*m_booleanInfo).m_columnNames);
	}
TEST_F ( PythonExtensionApiTests , GetBooleanResultsTest ) { InitializeSession ( 0 , ( * m_booleanInfo ) . GetColumnsNumber ( ) , m_scriptString ) ; InitializeColumns < SQLCHAR , SQL_C_BIT > ( m_booleanInfo . get ( ) ) ; TestExecute < SQLCHAR , SQL_C_BIT > ( ColumnInfo < SQLCHAR > :: sm_rowsNumber , ( * m_booleanInfo ) . m_dataSet . data ( ) , ( * m_booleanInfo ) . m_strLen_or_Ind . data ( ) , ( * m_booleanInfo ) . m_columnNames , false ) ; vector < void * > expectedReturnData = { } ; expectedReturnData . push_back ( ( m_booleanInfo -> m_dataSet [ 0 ] ) ) ; string result = " " ; expectedReturnData . push_back ( const_cast < char * > ( result . c_str ( ) ) ) ; TestGetResults < SQLCHAR , bool , SQL_C_BIT > ( ColumnInfo < SQLCHAR > :: sm_rowsNumber , expectedReturnData . data ( ) , ( * m_booleanInfo ) . m_strLen_or_Ind . data ( ) , ( * m_booleanInfo ) . m_columnNames ) ; }
Name: GetBooleanResultsTest
Description:
Test GetResults with default script expecting an OutputDataSet of Boolean column data.
Name : GetBooleanResultsTest Description : Test GetResults with default script expecting an OutputDataSet of Boolean column data .
// Initialize with a default Session that prints Hello PythonExtension // and assigns InputDataSet to OutputDataSet // // parametersNumber // validate