Refactor mdrun integration tests
[alexxy/gromacs.git] / src / programs / mdrun / tests / rerun.cpp
index 54b4e5951e3605cc809e40534b6611e0b6e58dd7..a73f2623be7afd3f8f6325378aef60254897b97a 100644 (file)
  */
 #include "gmxpre.h"
 
+#include "config.h"
+
 #include <gtest/gtest.h>
-#include "moduletest.h"
+
 #include "gromacs/options/filenameoption.h"
+
 #include "testutils/cmdlinetest.h"
 
-#include "config.h"
+#include "moduletest.h"
 
 namespace
 {
@@ -61,16 +64,16 @@ class MdrunRerun : public gmx::test::MdrunTestFixture,
 /* Among other things, this test ensures mdrun can read a trajectory. */
 TEST_P(MdrunRerun, WithDifferentInputFormats)
 {
-    useEmptyMdpFile();
-    useTopGroAndNdxFromDatabase("spc2");
-    EXPECT_EQ(0, callGrompp());
+    runner_.useEmptyMdpFile();
+    runner_.useTopGroAndNdxFromDatabase("spc2");
+    EXPECT_EQ(0, runner_.callGrompp());
 
     std::string rerunFileName = fileManager_.getInputFilePath(GetParam());
 
     ::gmx::test::CommandLine rerunCaller;
     rerunCaller.append("mdrun");
     rerunCaller.addOption("-rerun", rerunFileName);
-    ASSERT_EQ(0, callMdrun(rerunCaller));
+    ASSERT_EQ(0, runner_.callMdrun(rerunCaller));
 }
 
 /*! \brief Helper array of input files present in the source repo