Class: Syskit::Test::ActionInterfaceTest

Inherits:
Spec
  • Object
show all
Includes:
Syskit::Test, ProfileAssertions
Defined in:
lib/syskit/test/action_interface_test.rb

Overview

Base class for testing action interfaces

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ProfileAssertions

#Actions, #AtomicActions, #BulkAssertAtomicActions, #assert_can_configure_together, #assert_can_deploy, #assert_can_deploy_together, #assert_can_instanciate, #assert_can_instanciate_together, #assert_is_self_contained, #can_configure_together, #can_deploy, #can_deploy_together, #can_instanciate, #can_instanciate_together, #expand_coordination_models, #is_self_contained

Methods included from NetworkManipulation

#__syskit_root_components, #normalize_instanciation_models, #resolve_orocos_writer, #setup, #syskit_configure, #syskit_configure_and_start, #syskit_default_stub_name, #syskit_deploy, #syskit_deploy_and_configure, #syskit_deploy_configure_and_start, #syskit_engine_resolve_handle_plan_export, #syskit_export_to_svg, #syskit_generate_network, #syskit_guard_against_configure, #syskit_guard_against_start_and_configure, #syskit_prepare_configure, #syskit_prepare_start, #syskit_protect_configuration_manager, #syskit_start, #syskit_start_all_execution_agents, #syskit_start_execution_agents, #syskit_stub, #syskit_stub_and_deploy, #syskit_stub_attached_device, #syskit_stub_com_bus, #syskit_stub_component, #syskit_stub_composition_requirements, #syskit_stub_conf, #syskit_stub_configured_deployment, #syskit_stub_deploy_and_configure, #syskit_stub_deploy_configure_and_start, #syskit_stub_deployment, #syskit_stub_deployment_model, #syskit_stub_device, #syskit_stub_driver_model_for, #syskit_stub_model_id, #syskit_stub_network, #syskit_stub_network_abstract_component, #syskit_stub_network_deployment, #syskit_stub_placeholder, #syskit_stub_required_devices, #syskit_stub_requirements, #syskit_stub_resolves_remote_tasks=, #syskit_stub_resolves_remote_tasks?, #syskit_stub_task_context_model, #syskit_stub_task_context_requirements, #syskit_wait_ready, #syskit_write, #teardown, #use_deployment, #use_ruby_tasks, #use_unmanaged_task

Methods included from FlexMockExtension

#should_receive_operation

Methods included from ExecutionExpectations

#have_no_new_sample, #have_one_new_sample, resolve_orocos_reader

Methods inherited from Spec

#plan, #setup, #syskit_stub_attached_device_model, #syskit_stub_driver_model, #teardown, #teardown_registered_plans, use_syskit_model

Methods included from Base

#assert_has_no_new_sample, #assert_has_one_new_sample, #plug_connection_management, #plug_requirement_modifications, #setup, #stub_type, #teardown, #unplug_connection_management, #unplug_requirement_modifications

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



37
38
39
40
41
42
# File 'lib/syskit/test/action_interface_test.rb', line 37

def method_missing(m, *args, &block)
    if subject_syskit_model.find_action_by_name(m)
        subject_syskit_model.public_send(m, *args, &block)
    else super
    end
end

Class Method Details

.method_missing(m, *args, &block) ⇒ Object



26
27
28
29
30
31
# File 'lib/syskit/test/action_interface_test.rb', line 26

def self.method_missing(m, *args, &block)
    if subject_syskit_model.find_action_by_name(m)
        subject_syskit_model.public_send(m, *args, &block)
    else super
    end
end

.respond_to_missing?(m, include_private) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/syskit/test/action_interface_test.rb', line 22

def self.respond_to_missing?(m, include_private)
    !!subject_syskit_model.find_action_by_name(m) || super
end

.subject_syskit_modelObject



8
9
10
11
12
13
14
15
16
# File 'lib/syskit/test/action_interface_test.rb', line 8

def self.subject_syskit_model
    if @subject_syskit_model
        return @subject_syskit_model
    elsif desc.kind_of?(Class) && (desc <= Roby::Actions::Interface)
        return desc
    else
        super
    end
end

Instance Method Details

#respond_to_missing?(m, include_private) ⇒ Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/syskit/test/action_interface_test.rb', line 33

def respond_to_missing?(m, include_private)
    !!subject_syskit_model.find_action_by_name(m) || super
end

#subject_syskit_modelObject



18
19
20
# File 'lib/syskit/test/action_interface_test.rb', line 18

def subject_syskit_model
    self.class.subject_syskit_model
end