require "rover"
require "control_system"

class TestControlSystem 

  def initialize()
    Rover::USE_MOCKS = true
    rover = Rover.instance()
    @cs = ControlSystem.new(rover.motors, rover.acm)
  end

  def test_forward()
    #using 90 degrees to accommadate the values in the mock compass
    puts "testing control system forward method"
    @cs.forward(90, 2000)
    puts "if this statement shows up, method worked"
  end

  def test_turn_to_heading_continuous()
    puts "testing turn_to_heading_continuous"
    @cs.turn_to_heading(180)
    @cs.turn_to_heading(270)
    @cs.turn_to_heading(355)
    @cs.turn_to_heading(5)
    puts "if this statement shows up, method worked"
  end

end

test = TestControlSystem.new()
test.test_forward()
test.test_turn_to_heading_continuous()
