class SystemTests::TestSelectionCube
Public Instance Methods
get_2_last_created_cubes_volume(drb_interface)
click to toggle source
# File browser/ezii-1.0.0/eezee-3-aka-game-x-engine/managables/programs/game_aided_manufacturing/test/commands/test_selection_cube.rb, line 21 def get_2_last_created_cubes_volume(drb_interface) firstly_created_cube = drb_interface.cubes[0] secondly_created_cube = drb_interface.cubes[1] firstly_created_cube_volume = firstly_created_cube.geometry.volume secondly_created_cube_volume = secondly_created_cube.geometry.volume return [firstly_created_cube_volume, secondly_created_cube_volume] end
test_gets_mouse_down_position()
click to toggle source
# File browser/ezii-1.0.0/eezee-3-aka-game-x-engine/managables/programs/game_aided_manufacturing/test/commands/test_selection_cube.rb, line 6 def test_gets_mouse_down_position open_gam_window do |console_stdin, console_stdout| drb_interface.execute_command(drb_interface.functions[1]) drag_mouse_from_to_in_gam_window([100, 100], [150, 150]) scroll_out_in_gam_window(-10) sleep 1 drb_interface.execute_command(drb_interface.functions[1]) drag_mouse_from_to_in_gam_window([100, 100], [150, 150]) sleep 0.5 @output = get_2_last_created_cubes_volume(drb_interface) end assert @output.first < @output.last, "Firstly created cube is smaller" end
test_move_any_cube_somehow()
click to toggle source
# File browser/ezii-1.0.0/ezii-client/managables/programs/game_aided_manufacturing/test/commands/test_move_cube.rb, line 6 def test_move_any_cube_somehow open_gam_window do |console_stdin, console_stdout| cubes_before = drb_interface.cubes assert_equal cubes_after, cubes_before drb_interface.move_cube(:any, *[rand(), rand(), rand()]) cubes_after = drb_interface.cubes refute_equal cubes_after, cubes_before end end