Tudat/JsonInterface/UnitTests/unitTestMassRateModel.cpp
// Test 2: from thrust mass rate model
Test 2: from thrust mass rate model
Test 2 : from thrust mass rate model
BOOST_AUTO_TEST_CASE( test_json_massRateModel_fromThrust )
{
    using namespace basic_astrodynamics;
    using namespace simulation_setup;
    using namespace json_interface;
    const std::shared_ptr< MassRateModelSettings > fromFileSettings =
            parseJSONFile< std::shared_ptr< MassRateModelSettings > >( INPUT( "fromThrust" ) );
    const bool useAllThrustModels = false;
    const std::string associatedThrustSource = "booster2";
    const std::shared_ptr< MassRateModelSettings > manualSettings =
            std::make_shared< FromThrustMassModelSettings >( useAllThrustModels, associatedThrustSource );
    BOOST_CHECK_EQUAL_JSON( fromFileSettings, manualSettings );
}
BOOST_AUTO_TEST_CASE ( test_json_massRateModel_fromThrust ) { using namespace basic_astrodynamics ; using namespace simulation_setup ; using namespace json_interface ; const std :: shared_ptr < MassRateModelSettings > fromFileSettings = parseJSONFile < std :: shared_ptr < MassRateModelSettings > > ( INPUT ( " " ) ) ; const bool useAllThrustModels = false ; const std :: string associatedThrustSource = " " ; const std :: shared_ptr < MassRateModelSettings > manualSettings = std :: make_shared < FromThrustMassModelSettings > ( useAllThrustModels , associatedThrustSource ) ; BOOST_CHECK_EQUAL_JSON ( fromFileSettings , manualSettings ) ; }
Test 2: from thrust mass rate model
Test 2 : from thrust mass rate model
// Create MassRateModelSettings from JSON file // Create MassRateModelSettings manually // Compare