diff --git a/src/tests/src/solver/modelParser/testSystemParser.cpp b/src/tests/src/solver/modelParser/testSystemParser.cpp index e37e4d39c9..662e899917 100644 --- a/src/tests/src/solver/modelParser/testSystemParser.cpp +++ b/src/tests/src/solver/modelParser/testSystemParser.cpp @@ -229,15 +229,13 @@ BOOST_AUTO_TEST_CASE(parse_into_system_model) SystemParser::System systemObj = parser.parse(system); std::vector components; - for (const auto& c : systemObj.components) + for (const auto& c: systemObj.components) { components.push_back(createComponent(c)); } SystemModel::SystemBuilder builder; - auto systemModel = builder.withId(systemObj.id) - .withComponents(components) - .build(); + auto systemModel = builder.withId(systemObj.id).withComponents(components).build(); BOOST_CHECK_EQUAL(systemModel.Components().size(), 2); BOOST_CHECK_EQUAL(systemModel.Components().at("N").Id(), "N"); diff --git a/src/tests/src/study/system-model/test_system.cpp b/src/tests/src/study/system-model/test_system.cpp index 1bbf4fa5f7..e27e537f07 100644 --- a/src/tests/src/study/system-model/test_system.cpp +++ b/src/tests/src/study/system-model/test_system.cpp @@ -52,9 +52,7 @@ BOOST_AUTO_TEST_SUITE(_System_) BOOST_FIXTURE_TEST_CASE(nominal_build, SystemBuilderCreationFixture) { components = {createComponent("component1"), createComponent("component2")}; - auto system = system_builder.withId("system") - .withComponents(components) - .build(); + auto system = system_builder.withId("system").withComponents(components).build(); BOOST_CHECK_EQUAL(system.Id(), "system"); BOOST_CHECK_EQUAL(system.Components().size(), 2); BOOST_CHECK_EQUAL(system.Components().at("component1").Id(), "component1"); @@ -88,9 +86,10 @@ BOOST_FIXTURE_TEST_CASE(fail_on_no_component2, SystemBuilderCreationFixture) BOOST_FIXTURE_TEST_CASE(fail_on_components_with_same_id, SystemBuilderCreationFixture) { - components = {createComponent("component1"), createComponent("component2"), createComponent("component2")}; - system_builder.withId("system").withComponents(components).withComponents( - {components}); + components = {createComponent("component1"), + createComponent("component2"), + createComponent("component2")}; + system_builder.withId("system").withComponents(components).withComponents({components}); BOOST_CHECK_EXCEPTION(system_builder.build(), std::invalid_argument, checkMessage("System has at least two components with the same id "