diff --git a/tests/testthat/test-CreateInputsCrit.R b/tests/testthat/test-CreateInputsCrit.R index 26f910fdaf83eb19334836ed62a76a765737c445..f5b55d689867bb9269ddbe3f14cd42d8379cc401 100644 --- a/tests/testthat/test-CreateInputsCrit.R +++ b/tests/testthat/test-CreateInputsCrit.R @@ -123,6 +123,6 @@ test_that("Ungauged node as Apriori node should throw an error", { Obs = Qobs[IndPeriod_Run,], AprioriIds = c("54057" = "54032", "54032" = "54001", "54001" = "54029"), transfo = "sqrt"), - regexp = "\"54001\" is an ungauged upstream node of the node \"540032\"" + regexp = "\"54001\" is an ungauged upstream node of the node \"54032\"" ) }) diff --git a/tests/testthat/test-RunModel.R b/tests/testthat/test-RunModel.R index f75b408423c85c1fbac1f683efb3b4bfc93bbc64..177afc9e761bdb489f3fb4651bc3ddfe9e80038f 100644 --- a/tests/testthat/test-RunModel.R +++ b/tests/testthat/test-RunModel.R @@ -49,14 +49,19 @@ test_that("RunModel.Supervisor with no regulation should returns same results as }) # Add 2 nodes to the network -griwrm2 <- rbind(griwrm, - data.frame( - id = c("R1", "R2"), - down = "54057", - length = 100, - area = NA, - model = NA - )) +nodes2 <- rbind(nodes, + data.frame( + gauge_id = c("R1", "R2"), + downstream_id = "54057", + distance_downstream = 100, + area = NA, + model = NA + )) +griwrm2 <- CreateGRiwrm(nodes2, + list(id = "gauge_id", + down = "downstream_id", + length = "distance_downstream")) + # Add Qobs for the 2 new nodes and create InputsModel Qobs2 <- cbind(Qobs, matrix(data = rep(0, 2*nrow(Qobs)), ncol = 2)) colnames(Qobs2) <- c(colnames(Qobs2)[1:6], "R1", "R2")