require 'test/unit'

require 'fox'

include Fox

class TC_FXShell < Test::Unit::TestCase
  def setup
    if FXApp.instance.nil?
      @app = FXApp.new('TC_FXShell', 'FXRuby')
      @app.init([])
      @mainwin = FXMainWindow.new(@app, 'TC_FXShell')
    else
      @app = FXApp.instance
      @mainwin = @app.mainWindow
    end
  end
  
  def test_new
    # Free-floating
    shell1 = FXShell.new(@app, 0, 0, 0, 0, 0)
      
    # Owned
    shell2 = FXShell.new(@mainwin, 0, 0, 0, 0, 0)
    assert_same(@mainwin, shell2.owner)
  end
end
