title: EInvalidOperation (no parent window) when creating a TFrame in a unit-testing (and therefore console) application
body: <p>Now, I'm writing a unit test for a TFrame-derrived class...</p>
  
  <p>In my Setup method, I got the following code:</p>
  
  <pre><code>procedure TestFixtureClass.Setup;
  begin
      FTestContainer := TContainer.Create;
  
      FTestContainer.RegisterType&lt;TframeClass, TframeClass&gt;
          .Implements&lt;IFrameClass&gt;
          .AsSingleton(TRefCounting.True)
          .DelegateTo(function: TframeClass 
              begin
                  // also tried: TframeClass.Create(Application);
                  // and: form1 := TForm1.Create(Application); TframeClass.Create(form1);
                  Result := TframeClass.Create(nil);
              end)
          .AsDefault;
  
      FTestContainer.Build;
  
      FSut := FTestContainer.Resolve&lt;IFrameClass&gt;;  // Exception here
  end;
  </code></pre>
  
  <p>TframeClass has reference counting (similar to TInterfacedObject), thats why I use TRefCounting.True in AsSingleton.</p>
  
  <p>But now I got the following problem: Exception EInvalidoperation: 'Element has no parent window'.</p>
  
  <p>The above TFrameClass works in the production application, but it raises the exception in the test application.</p>
  
  <p>Is there a possibility to get this work, keeping the SUT (system-under-test) a TFrame-derrived class?</p>