Version: 8.3.0
YACSPMMLBasicsTest1 Class Reference

#include <YACSPMMLBasicsTest1.hxx>

Inheritance diagram for YACSPMMLBasicsTest1:
Collaboration diagram for YACSPMMLBasicsTest1:

Public Member Functions

void setUp ()
 
void tearDown ()
 
void testYACSdriverLinearRegression ()
 
void testYACSdriverNeuralNetwork ()
 
void testYACSdriver_LRANN ()
 
void testYACSdriver_PmmlDoesNotExist ()
 

Private Member Functions

 CPPUNIT_TEST_SUITE (YACSPMMLBasicsTest1)
 
 CPPUNIT_TEST (testYACSdriverLinearRegression)
 
 CPPUNIT_TEST (testYACSdriverNeuralNetwork)
 
 CPPUNIT_TEST (testYACSdriver_LRANN)
 
 CPPUNIT_TEST (testYACSdriver_PmmlDoesNotExist)
 
 CPPUNIT_TEST_SUITE_END ()
 

Private Attributes

std::string resourcesDir
 

Detailed Description

Definition at line 30 of file YACSPMMLBasicsTest1.hxx.

Member Function Documentation

YACSPMMLBasicsTest1::CPPUNIT_TEST ( testYACSdriverLinearRegression  )
private
YACSPMMLBasicsTest1::CPPUNIT_TEST ( testYACSdriverNeuralNetwork  )
private
YACSPMMLBasicsTest1::CPPUNIT_TEST ( testYACSdriver_LRANN  )
private
YACSPMMLBasicsTest1::CPPUNIT_TEST ( testYACSdriver_PmmlDoesNotExist  )
private
YACSPMMLBasicsTest1::CPPUNIT_TEST_SUITE ( YACSPMMLBasicsTest1  )
private
YACSPMMLBasicsTest1::CPPUNIT_TEST_SUITE_END ( )
private
void YACSPMMLBasicsTest1::setUp ( )

Definition at line 126 of file YACSPMMLBasicsTest1.cxx.

127 {
128  resourcesDir = "samples/";
129 }
void YACSPMMLBasicsTest1::tearDown ( )

Definition at line 131 of file YACSPMMLBasicsTest1.cxx.

132 {
133 }
void YACSPMMLBasicsTest1::testYACSdriver_LRANN ( )

Definition at line 172 of file YACSPMMLBasicsTest1.cxx.

References DEBTRACE, driverTest(), YACS::ENGINE::DataPort::getAsString(), YACS::ENGINE::Node::getOutputPort(), YACS::ENGINE::Proc::nodeMap, p, and PMMLBasicsTestLauncher::ret.

173 {
174  std::string xmlFilename = resourcesDir + "schemaANNLR2.xml";
175  Proc *p = 0;
176  int ret = driverTest(p, xmlFilename.c_str() );
177  CPPUNIT_ASSERT(ret == 0);
178  DEBTRACE("Proc *p = " << p);
179  CPPUNIT_ASSERT(p != 0);
180  if (p)
181  {
182  YACS::ENGINE::Node* node = p->nodeMap[string("PyGetRes")];
183  YACS::ENGINE::OutputPort* outputPort = node->getOutputPort(string("res"));
184  string str = outputPort->getAsString();
185  CPPUNIT_ASSERT_EQUAL(str, string("True"));
186  delete p;
187  }
188 }
void YACSPMMLBasicsTest1::testYACSdriver_PmmlDoesNotExist ( )

Definition at line 190 of file YACSPMMLBasicsTest1.cxx.

References DEBTRACE, driverTest(), YACS::ENGINE::DataPort::getAsString(), YACS::ENGINE::Node::getOutputPort(), YACS::ENGINE::Proc::nodeMap, p, and PMMLBasicsTestLauncher::ret.

191 {
192  std::string xmlFilename = resourcesDir + "schemaPmmlDoesNotExist.xml";
193  Proc *p = 0;
194  int ret = driverTest(p, xmlFilename.c_str() );
195  CPPUNIT_ASSERT(ret == 0);
196  DEBTRACE("Proc *p = " << p);
197  CPPUNIT_ASSERT(p != 0);
198  if (p)
199  {
200  YACS::ENGINE::Node* node = p->nodeMap[string("PyGetRes")];
201  YACS::ENGINE::OutputPort* outputPort = node->getOutputPort(string("res"));
202  string str = outputPort->getAsString();
203  CPPUNIT_ASSERT_EQUAL(str, string("None"));
204  delete p;
205  }
206 }
void YACSPMMLBasicsTest1::testYACSdriverLinearRegression ( )

Definition at line 136 of file YACSPMMLBasicsTest1.cxx.

References DEBTRACE, driverTest(), YACS::ENGINE::DataPort::getAsString(), YACS::ENGINE::Node::getOutputPort(), YACS::ENGINE::Proc::nodeMap, p, and PMMLBasicsTestLauncher::ret.

137 {
138  std::string xmlFilename = resourcesDir + "schemaLR2.xml";
139  Proc *p = 0;
140  int ret = driverTest(p, xmlFilename.c_str() );
141  CPPUNIT_ASSERT(ret == 0);
142  DEBTRACE("Proc *p = " << p);
143  CPPUNIT_ASSERT(p != 0);
144  if (p)
145  {
146  YACS::ENGINE::Node* node = p->nodeMap[string("PyGetRes")];
147  YACS::ENGINE::OutputPort* outputPort = node->getOutputPort(string("res"));
148  string str = outputPort->getAsString();
149  CPPUNIT_ASSERT_EQUAL(str, string("True"));
150  delete p;
151  }
152 }
void YACSPMMLBasicsTest1::testYACSdriverNeuralNetwork ( )

Definition at line 154 of file YACSPMMLBasicsTest1.cxx.

References DEBTRACE, driverTest(), YACS::ENGINE::DataPort::getAsString(), YACS::ENGINE::Node::getOutputPort(), YACS::ENGINE::Proc::nodeMap, p, and PMMLBasicsTestLauncher::ret.

155 {
156  std::string xmlFilename = resourcesDir + "schemaANN2.xml";
157  Proc *p = 0;
158  int ret = driverTest(p, xmlFilename.c_str() );
159  CPPUNIT_ASSERT(ret == 0);
160  DEBTRACE("Proc *p = " << p);
161  CPPUNIT_ASSERT(p != 0);
162  if (p)
163  {
164  YACS::ENGINE::Node* node = p->nodeMap[string("PyGetRes")];
165  YACS::ENGINE::OutputPort* outputPort = node->getOutputPort(string("res"));
166  string str = outputPort->getAsString();
167  CPPUNIT_ASSERT_EQUAL(str, string("True"));
168  delete p;
169  }
170 }

Member Data Documentation


The documentation for this class was generated from the following files: