require 'test/unit'

require 'fox'

include Fox

class TC_FXDCWindow < Test::Unit::TestCase
  def setup
    if FXApp.instance.nil?
      @app = FXApp.new('TC_FXDCWindow', 'FXRuby')
      @app.init([])
    else
      @app = FXApp.instance
    end
    @mainWindow = @app.mainWindow
    if @mainWindow.nil?
      @mainWindow = FXMainWindow.new(@app, "Main Window")
    end
    @app.create
  end
  def test_new
    dc = FXDCWindow.new(@mainWindow)
    dc.drawPoint(0, 0)
    dc.end
  end
  def test_new_with_block
    dc = FXDCWindow.new(@mainWindow) do |dc|
      dc.drawPoint(0, 0)
    end
  end
end
