From c28fc60917897ddac34776118a60bae0cc677e8d Mon Sep 17 00:00:00 2001 From: Rares <6453351+raresserban@users.noreply.github.com> Date: Tue, 3 Oct 2023 11:35:25 +0300 Subject: [PATCH] Update nft escrow tests. --- .../tests/nft_escrow_scenario_go_test.rs | 16 +++++++++++----- .../tests/nft_escrow_scenario_rs_test.rs | 10 +++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/contracts/nft-escrow/tests/nft_escrow_scenario_go_test.rs b/contracts/nft-escrow/tests/nft_escrow_scenario_go_test.rs index be647e3c..8b43a59f 100644 --- a/contracts/nft-escrow/tests/nft_escrow_scenario_go_test.rs +++ b/contracts/nft-escrow/tests/nft_escrow_scenario_go_test.rs @@ -1,24 +1,30 @@ +use multiversx_sc_scenario::*; + +fn world() -> ScenarioWorld { + ScenarioWorld::vm_go() +} + #[test] fn accept_go() { - multiversx_sc_scenario::run_go("scenarios/accept.scen.json"); + world().run("scenarios/accept.scen.json"); } #[test] fn cancel_go() { - multiversx_sc_scenario::run_go("scenarios/cancel.scen.json"); + world().run("scenarios/cancel.scen.json"); } #[test] fn escrow_go() { - multiversx_sc_scenario::run_go("scenarios/escrow.scen.json"); + world().run("scenarios/escrow.scen.json"); } #[test] fn init_go() { - multiversx_sc_scenario::run_go("scenarios/init.scen.json"); + world().run("scenarios/init.scen.json"); } #[test] fn views_go() { - multiversx_sc_scenario::run_go("scenarios/views.scen.json"); + world().run("scenarios/views.scen.json"); } diff --git a/contracts/nft-escrow/tests/nft_escrow_scenario_rs_test.rs b/contracts/nft-escrow/tests/nft_escrow_scenario_rs_test.rs index 2ff6ba1b..b78c1d9f 100644 --- a/contracts/nft-escrow/tests/nft_escrow_scenario_rs_test.rs +++ b/contracts/nft-escrow/tests/nft_escrow_scenario_rs_test.rs @@ -7,29 +7,29 @@ fn world() -> ScenarioWorld { #[test] #[ignore = "not supported"] fn accept_rs() { - multiversx_sc_scenario::run_rs("scenarios/accept.scen.json", world()); + world().run("scenarios/accept.scen.json"); } #[test] #[ignore = "not supported"] fn cancel_rs() { - multiversx_sc_scenario::run_rs("scenarios/cancel.scen.json", world()); + world().run("scenarios/cancel.scen.json"); } #[test] #[ignore = "not supported"] fn escrow_rs() { - multiversx_sc_scenario::run_rs("scenarios/escrow.scen.json", world()); + world().run("scenarios/escrow.scen.json"); } #[test] #[ignore = "not supported"] fn init_rs() { - multiversx_sc_scenario::run_rs("scenarios/init.scen.json", world()); + world().run("scenarios/init.scen.json"); } #[test] #[ignore = "not supported"] fn views_rs() { - multiversx_sc_scenario::run_rs("scenarios/views.scen.json", world()); + world().run("scenarios/views.scen.json"); }