testing - Pass arguments to App object in Scala -


I am currently scalatest.org with some unit tests for my application:

  scala & gt; Object Test App {| Printlain (args) | }  

How can I pass the parameter to that object? I tried to override the value of arguments , but after a few research I came to know that it is not possible:

  / ** to apply the command line arguments Has been passed in the 'main' method. Array [string] = _args Private var_args: Array [String] = _  

_ How do I pass a custom parameter in the code?

Cheers

I think that you main (argues: array [String]) The app wants to invoke the inherited method.

  scala & gt; Object Test App {args.foreach (println)} extends defined object test scale & gt; Test. Main (Array ("A1")) A1 Scale & gt; Test. Main (array ("A1", "A2")) A1A2  

Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -