19#include <boost/test/unit_test.hpp>
22#include <oret/toplevelfixture.hpp>
25using namespace boost::unit_test_framework;
38vector<SSDes> generateDescriptions() {
41 result.push_back(
SSDes(SSType::Base));
42 result.push_back(
SSDes(SSType::Up,
RFKey(RFType::DiscountCurve,
"EUR", 0),
"2W"));
43 result.push_back(
SSDes(SSType::Up,
RFKey(RFType::IndexCurve,
"EUR-EURIBOR-6M", 11),
"30Y"));
44 result.push_back(
SSDes(SSType::Down,
RFKey(RFType::FXSpot,
"JPYUSD", 0),
"spot"));
45 result.push_back(
SSDes(SSType::Up,
RFKey(RFType::SwaptionVolatility,
"USD", 22),
"3M/3Y/ATM"));
46 result.push_back(
SSDes(
SSDes(SSType::Up,
RFKey(RFType::DiscountCurve,
"EUR", 0),
"2W"),
47 SSDes(SSType::Up,
RFKey(RFType::DiscountCurve,
"EUR", 1),
"1M")));
48 result.push_back(
SSDes(
SSDes(SSType::Up,
RFKey(RFType::FXSpot,
"JPYUSD", 0),
"spot"),
49 SSDes(SSType::Up,
RFKey(RFType::DiscountCurve,
"USD", 1),
"1M")));
58BOOST_AUTO_TEST_SUITE(ShiftScenarioGeneratorTest)
62 for (
const auto& des : generateDescriptions()) {
64 SSDes desFromString(strDes);
65 BOOST_CHECK_EQUAL(des, desFromString);
69BOOST_AUTO_TEST_SUITE_END()
71BOOST_AUTO_TEST_SUITE_END()
Data types stored in the scenario class.
KeyType
Risk Factor types.
OREAnalytics Top level fixture.
std::string to_string(const LocationInfo &l)
Fixture that can be used at top level of OREAnalytics test suites.
Shift scenario generation.
ShiftScenarioGenerator::ScenarioDescription SSDes
BOOST_AUTO_TEST_CASE(testShiftScenarioStringConstruction)