void TestParserDeLibros::testObtenerEditorialEnLibroSinEditorial(){ string strLibro = generarMockLibroSinEditorial(); const char *auxlibro= strLibro.c_str(); char* libro; libro = const_cast<char*>(auxlibro); Registro* regLibro = this->parser->obtenerRegistroDeLibro((libro) ); string editorial = regLibro->getEditorial(); CPPUNIT_ASSERT_MESSAGE( "No se creó la editorial por defecto en el registro",!(editorial.empty() ) ); }
void TestParserDeLibros::testObtenerAutorEditorialTituloDeLibroConTodosLosDatos(){ string strLibro = generarMockLibroCompleto(); const char *auxlibro= strLibro.c_str(); char* libro; libro = const_cast<char*>(auxlibro); Registro* regLibro = this->parser->obtenerRegistroDeLibro((libro) ); string autor = regLibro->getAutor(); CPPUNIT_ASSERT( (autor.compare("darrenzshan")) == 0 ); string titulo = regLibro->getTitulo(); CPPUNIT_ASSERT( (titulo.compare("lazmontazzazdezloszvampiros")) == 0 ); string editorial = regLibro->getEditorial(); CPPUNIT_ASSERT( (editorial.compare("littlezzbrownzandzcompany")) == 0 ); }