Sha256: 0c13c80f41822ad10b79ad9c6105f3b9fe94c20bd1bbd365d68fdc4894b26e18

Contents?: true

Size: 1.13 KB

Versions: 3

Compression:

Stored size: 1.13 KB

Contents

require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class MoveToFirstFrameToolTest < Test::Unit::TestCase
  
  def test_action_description
    assert_equal "Move all the keyframes in time so that the track starts at frame 1", Tracksperanto::Tool::MoveToFirst.action_description
  end
  
  def test_move_to_first_frame
    receiver = flexmock
    receiver.should_receive(:start_export).with(120,120)

    receiver.should_receive(:start_tracker_segment).with("Tracker1")
    receiver.should_receive(:export_point).with(4, 100, 100, 0)
    receiver.should_receive(:end_tracker_segment)

    receiver.should_receive(:start_tracker_segment).with("Tracker2")
    receiver.should_receive(:export_point).with(0, 100, 100, 0)
    receiver.should_receive(:end_tracker_segment)

    receiver.should_receive(:end_export)
    
    m = Tracksperanto::Tool::MoveToFirst.new(receiver)
    
    m.start_export(120, 120)
    
    m.start_tracker_segment("Tracker1")
    m.export_point(14, 100, 100, 0)
    m.end_tracker_segment
    
    m.start_tracker_segment("Tracker1")
    m.export_point(10, 100, 100, 0)
    m.end_tracker_segment
    
    m.end_export
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tracksperanto-4.1.2 test/tools/test_move_to_first_frame_middleware.rb
tracksperanto-4.1.0 test/tools/test_move_to_first_frame_middleware.rb
tracksperanto-4.0.0 test/tools/test_move_to_first_frame_middleware.rb