Exemplo n.º 1
0
  public UserApp() throws Exception {

    MusicSystemConfig.configureServices();
    userService = MusicSystemConfig.getUserService();

    in = new Scanner(System.in);
  }
Exemplo n.º 2
0
  public static void main(String[] args) {

    try {
      UserApp myApp;
      if (args.length == 0) myApp = new UserApp();
      else myApp = new UserApp();
      System.out.println("starting User app");
      myApp.handleCatalogPage();
      System.out.println("Thanks for visiting the Band's site.");
    } catch (Exception e) {
      System.err.println("Error in run: StackTrace for it: ");
      e.printStackTrace();
      System.err.println("Error in run, shorter report: " + MusicSystemConfig.exceptionReport(e));
    }
  }
 public static void main(String[] args) {
   String inFile = null;
   if (args.length == 1) {
     inFile = args[0];
   } else {
     System.out.println("usage:java <inputFile> ");
     System.exit(1);
   }
   SystemTest test = null;
   try {
     test = new SystemTest(inFile);
     test.run();
     System.out.println("Run complete, exiting");
   } catch (Exception e) {
     System.err.println("Error in run: StackTrace for it: ");
     e.printStackTrace();
     System.err.println("Error in run, shorter report: " + MusicSystemConfig.exceptionReport(e));
   }
 }
 public SystemTest(String inFile) throws Exception {
   this.inFile = inFile;
   MusicSystemConfig.configureServices();
   adminService = MusicSystemConfig.getAdminService();
   userService = MusicSystemConfig.getUserService();
 }