title: Too many arguments for constructor
body: <p>Trying to learn some Scala.</p>
  
  <p>I have the following classes in my project:</p>
  
  <pre><code>package com.fluentaws
  
  class AwsProvider(val accountId: String, val accountSecret: String) {
  
   def AwsAccount = new AwsAccount(accountId, accountSecret)
  
  }
  
  class AwsAccount(val accountId : String, val accountSecret : String) {
  
  }
  </code></pre>
  
  <p>And the following test:</p>
  
  <pre><code>package com.fluentaws
  
  import org.scalatest._
  
  class AwsProvider extends FunSuite {
  
    test("When providing AwsProvider with AWS Credentials we can retrieve an AwsAccount with the same values") {
  
      val awsAccountId = "abc"
      val awsAccountSecret = "secret"
  
      val awsProvider = new AwsProvider(awsAccountId, awsAccountSecret)
  
      val awsAccount = awsProvider.AwsAccount
  
      assert(awsAccount.accountId == awsAccountId)
      assert(awsAccount.accountSecret == awsAccountSecret)
    }
  
  }
  </code></pre>
  
  <p>When my test-suite runs, I get the compile-time error:</p>
  
  <blockquote>
    <p>too many arguments for constructor AwsProvider:
    ()com.fluentaws.AwsProvider [error]     val awsProvider = new
    AwsProvider(awsAccountId, awsAccountSecret) [error]                   </p>
  </blockquote>
  
  <p>From the error message it looks like it sees a constructor with zero parameters ?</p>
  
  <p>Can anyone see what I am doing wrong here ?</p>