Merge pull request #1939 from joakim-hove/group-names

Remove calls to Schedule::getGroups()
This commit is contained in:
Joakim Hove 2019-07-15 07:42:12 +02:00 committed by GitHub
commit 70b8fd921f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,9 +95,9 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromGroup) {
const auto& nodes = sched.getGroupTree(2);
for( const auto& grp : sched.getGroups() ) {
if( !nodes.exists( grp->name() ) ) continue;
const auto& group = *grp;
for( const auto& grp_name : sched.groupNames() ) {
if( !nodes.exists( grp_name ) ) continue;
const auto& group = sched.getGroup(grp_name);
std::shared_ptr<WellsGroupInterface> wellsGroup = createGroupWellsGroup(group, 2, pu);
BOOST_CHECK_EQUAL(group.name(), wellsGroup->name());
@ -131,10 +131,9 @@ BOOST_AUTO_TEST_CASE(EfficiencyFactor) {
const auto& nodes = sched.getGroupTree(2);
for( const auto& grp : sched.getGroups() ) {
if( !nodes.exists( grp->name() ) ) continue;
const auto& group = *grp;
for( const auto& grp_name : sched.groupNames() ) {
if( !nodes.exists( grp_name ) ) continue;
const auto& group = sched.getGroup(grp_name);
std::shared_ptr<WellsGroupInterface> wellsGroup = createGroupWellsGroup(group, 2, pu);
BOOST_CHECK_EQUAL(group.name(), wellsGroup->name());