Sha256: 2700f68be189958379df11f927a70593f861eebb44f406317eef34d037dd8205

Contents?: true

Size: 1.2 KB

Versions: 10

Compression:

Stored size: 1.2 KB

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class MoveToFirstFrameMiddlewareTest < Test::Unit::TestCase
  
  def test_action_description
    assert_equal "Move all the keyframes in time so that the first frame is the first animated keyframe", Tracksperanto::Middleware::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::Middleware::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

10 entries across 10 versions & 1 rubygems

Version Path
tracksperanto-2.12.0 test/middleware/test_move_to_first_frame_middleware.rb
tracksperanto-2.11.3 test/middleware/test_move_to_first_frame_middleware.rb
tracksperanto-2.11.2 test/middleware/test_move_to_first_frame_middleware.rb
tracksperanto-2.11.1 test/middleware/test_move_to_first_frame_middleware.rb
tracksperanto-2.11.0 test/middleware/test_move_to_first_frame_middleware.rb
tracksperanto-2.10.0 test/middleware/test_move_to_first_frame_middleware.rb
tracksperanto-2.9.9 test/middleware/test_move_to_first_frame_middleware.rb
tracksperanto-2.9.8 test/middleware/test_move_to_first_frame_middleware.rb
tracksperanto-2.9.7 test/middleware/test_move_to_first_frame_middleware.rb
tracksperanto-2.9.6 test/middleware/test_move_to_first_frame_middleware.rb