summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/Trading/import_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/Trading/import_test.cpp')
-rw-r--r--TAO/orbsvcs/tests/Trading/import_test.cpp78
1 files changed, 0 insertions, 78 deletions
diff --git a/TAO/orbsvcs/tests/Trading/import_test.cpp b/TAO/orbsvcs/tests/Trading/import_test.cpp
deleted file mode 100644
index 56d6346186d..00000000000
--- a/TAO/orbsvcs/tests/Trading/import_test.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-// $Id$
-
-#include "tao/TAO.h"
-#include "Offer_Importer.h"
-
-ACE_RCSID(Trading, import_test, "$Id$")
-
-void
-parse_args (int argc, char *argv[],
- CORBA::Boolean& federated,
- CORBA::Boolean& verbose)
-{
- int opt;
- ACE_Get_Opt get_opt (argc, argv, "fq");
-
- verbose = 1;
- federated = 0;
- while ((opt = get_opt ()) != EOF)
- {
- if (opt == 'f')
- federated = 1;
- else if (opt == 'q')
- verbose = 0;
- }
-}
-
-int
-main (int argc, char** argv)
-{
- TAO_TRY
- {
- TAO_ORB_Manager orb_manager;
- orb_manager.init (argc, argv, TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Command line argument interpretation.
- CORBA::Boolean federated = 0,
- verbose = 0;
- ::parse_args (argc, argv, federated, verbose);
-
- // Initialize the ORB and bootstrap to the Lookup interface.
- CORBA::ORB_var orb = orb_manager.orb ();
- ACE_DEBUG ((LM_ERROR, "Bootstrap to the Lookup interface.\n"));
- CORBA::Object_var trading_obj =
- orb->resolve_initial_references ("TradingService");
-
- if (CORBA::is_nil (trading_obj.in ()))
- ACE_ERROR_RETURN ((LM_ERROR,
- " (%P|%t) Unable to initialize the Trading Service.\n"),
- -1);
-
- // Narrow the lookup interface.
- ACE_DEBUG ((LM_DEBUG, "Narrowing the lookup interface.\n"));
- CosTrading::Lookup_var lookup_if =
- CosTrading::Lookup::_narrow (trading_obj.in (), TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- // Run the Offer Importer tests
- ACE_DEBUG ((LM_DEBUG, "Running the Offer Importer tests.\n"));
- TAO_Offer_Importer offer_importer (lookup_if.in (), verbose);
-
- offer_importer.perform_queries (TAO_TRY_ENV);
- TAO_CHECK_ENV;
-
- if (federated)
- {
- offer_importer.perform_directed_queries (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
- }
- TAO_CATCHANY
- {
- ACE_ERROR_RETURN ((LM_ERROR, "Trader Import Tests Failed."), -1);
- }
- TAO_ENDTRY;
-
- return 0;
-}