Skip to content

Commit

Permalink
test: add test case for multiple missing formulations when linking ex…
Browse files Browse the repository at this point in the history
…ternal attrs
  • Loading branch information
hellkite500 committed Aug 16, 2024
1 parent 629e73e commit 65dc896
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions test/realizations/Formulation_Manager_Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -954,13 +954,24 @@ TEST_F(Formulation_Manager_Test, read_external_attributes) {
this->fabric->remove_feature_by_id("cat-27115");

manager = realization::Formulation_Manager(stream_b);


//Test that two hydrofabric features, using global formulation (EXAMPLE_5_b)
//end up with unique hydrofabric parameters in the formulations after they
//are created and linked to the attributes. Uses the same parameter name with
//different values.

add_and_check_feature("cat-67", geojson::PropertyMap{
{ "MODEL_VAR_2", geojson::JSONProperty{"MODEL_VAR_2", 9231 } },
{ "val", geojson::JSONProperty{"val", 7.41722 } }
});


add_and_check_feature("cat-27", geojson::PropertyMap{
{ "MODEL_VAR_2", geojson::JSONProperty{"MODEL_VAR_2", 18 } },
{ "val", geojson::JSONProperty{"val", 3} }
});

manager.read(this->fabric, catchment_output);


check_formulation_values(manager, "cat-27", { 3.00000, 18.0 });
check_formulation_values(manager, "cat-67", { 7.41722, 9231 });
}

0 comments on commit 65dc896

Please sign in to comment.