2 #include "BoostUnitTest.h" 8 #include <boost/property_tree/ptree.hpp> 9 #include <boost/property_tree/xml_parser.hpp> 18 fakeit::Mock<NuTo::CellInterface> cell0;
19 fakeit::Mock<NuTo::CellInterface> cell1;
25 Eigen::VectorXd bla = Eigen::Vector3d::Constant(1.0);
26 fakeit::When(ConstOverloadedMethod(cell0,
Interpolate, Eigen::VectorXd(Eigen::VectorXd))).AlwaysReturn(bla);
27 fakeit::When(ConstOverloadedMethod(cell1,
Interpolate, Eigen::VectorXd(Eigen::VectorXd))).AlwaysReturn(bla);
28 fakeit::When(Method(cell0, GetShape)).AlwaysReturn(myQuad);
29 fakeit::When(Method(cell1, GetShape)).AlwaysReturn(myQuad);
30 return {cell0.get(), cell1.get()};
37 namespace pt = boost::property_tree;
42 static void CheckNum(std::string filename,
int expectedNumPoints,
int expectedNumCells)
45 pt::read_xml(filename, tree);
46 int numOfPoints = tree.get<
int>(
"VTKFile.UnstructuredGrid.Piece.<xmlattr>.NumberOfPoints");
47 int numOfCells = tree.get<
int>(
"VTKFile.UnstructuredGrid.Piece.<xmlattr>.NumberOfCells");
48 BOOST_CHECK_EQUAL(numOfPoints, expectedNumPoints);
49 BOOST_CHECK_EQUAL(numOfCells, expectedNumCells);
Definition: TestStructure.h:16
Eigen::VectorXd Interpolate(const ElementInterface &element, NaturalCoords ipCoords)
Definition: ElementInterface.h:31
Definition: Quadrilateral.h:8
Definition: TestStructure.h:39
static void CheckNum(std::string filename, int expectedNumPoints, int expectedNumCells)
Definition: TestStructure.h:42
NuTo::Group< NuTo::CellInterface > Cells()
Definition: TestStructure.h:23
Definition: Exception.h:6