Sha256: 2c65baf50cec849ca00e63df0f1290b6fcff4709cd290f2a8471895d31fc8f10

Contents?: true

Size: 704 Bytes

Versions: 29

Compression:

Stored size: 704 Bytes

Contents

require_relative 'helper'


class TestContactEvent < Test::Unit::TestCase

  def event(*args)
    Reflex::ContactEvent.new(*args)
  end

  def shape()
    Reflex::RectShape.new
  end

  def view(*args)
    Reflex::View.new(*args)
  end

  def test_initialize()
    s, v    = shape, view
    v.shape = s# attach to view
    e       = event Reflex::ContactEvent::BEGIN, s
    assert_equal :begin, e.action
    assert_equal s,      e.shape
    assert_equal v,      e.view
  end

  def test_dup()
    e1 = event Reflex::ContactEvent::BEGIN, shape
    e2 = e1.dup
    e1.block
    e3 = e1.dup
    assert_true  e1.blocked?
    assert_false e2.blocked?
    assert_true  e3.blocked?
  end

end# TestContactEvent

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
reflexion-0.3.4 test/test_contact_event.rb
reflexion-0.3.3 test/test_contact_event.rb
reflexion-0.3.2 test/test_contact_event.rb
reflexion-0.3.1 test/test_contact_event.rb
reflexion-0.3 test/test_contact_event.rb
reflexion-0.2.1 test/test_contact_event.rb
reflexion-0.2 test/test_contact_event.rb
reflexion-0.1.57 test/test_contact_event.rb
reflexion-0.1.56 test/test_contact_event.rb
reflexion-0.1.55 test/test_contact_event.rb
reflexion-0.1.54 test/test_contact_event.rb
reflexion-0.1.53 test/test_contact_event.rb
reflexion-0.1.52 test/test_contact_event.rb
reflexion-0.1.51 test/test_contact_event.rb
reflexion-0.1.50 test/test_contact_event.rb
reflexion-0.1.49 test/test_contact_event.rb
reflexion-0.1.48 test/test_contact_event.rb
reflexion-0.1.47 test/test_contact_event.rb
reflexion-0.1.46 test/test_contact_event.rb
reflexion-0.1.45 test/test_contact_event.rb