Observed data parsing. Add address creation unit test

This commit is contained in:
Bjørn Erik Jensen 2018-05-25 15:35:06 +02:00
parent 40e9151069
commit f7ac8fe6e4
2 changed files with 19 additions and 1 deletions

View File

@ -338,7 +338,7 @@ std::tuple<int, int, int> RifEclipseSummaryAddress::ijkTupleFromUiText(const std
//--------------------------------------------------------------------------------------------------
std::string RifEclipseSummaryAddress::formatUiTextRegionToRegion() const
{
return std::to_string(this->regionNumber()) + " -> "
return std::to_string(this->regionNumber()) + " - "
+ std::to_string(this->regionNumber2());
}

View File

@ -784,6 +784,24 @@ TEST(RifKeywordBasedRsmspecParserTest, TestTimeSteps)
EXPECT_TRUE(firstDate == QDateTime::fromTime_t(timeSteps[0]));
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
TEST(RifKeywordBasedRsmspecParserTest, TestAddressCreation)
{
std::string quantityName = "LCABC";
std::vector< std::string > headerColumn;
headerColumn.push_back("wellName");
headerColumn.push_back("lgrName");
headerColumn.push_back("12 14 16");
RifEclipseSummaryAddress address = RifEclipseUserDataKeywordTools::makeAndFillAddress(quantityName, headerColumn);
EXPECT_TRUE(address.isValid());
EXPECT_EQ(address.category(), RifEclipseSummaryAddress::SUMMARY_WELL_COMPLETION_LGR);
EXPECT_EQ(address.uiText(), "LCABC:lgrName:wellName:12, 14, 16");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------