Table of Contents

Class TestModuleActivator

Namespace
Ranorex.Core.Testing
Assembly
Ranorex.Core.dll

Provides functionality to register and resolve factory methods to create ITestModule instances with a specific unique ID and/or name from assemblies.

public class TestModuleActivator
Inheritance
TestModuleActivator
Inherited Members

Constructors

TestModuleActivator()

public TestModuleActivator()

Methods

IsSystemOrRanorexAssembly(string)

Determines whether the path to an assembly is a System or Ranorex assembly.

public static bool IsSystemOrRanorexAssembly(string assemblyPath)

Parameters

assemblyPath string

The path to the assembly to inspect.

Returns

bool

true if the assemblyPath is a System or Ranorex assembly, otherwise false.

Register(string, TestModuleFactoryMethod)

Registers a new factory method that creates ITestModule instances with the specified module GUID.

public static void Register(string moduleGuid, TestModuleActivator.TestModuleFactoryMethod factoryMethod)

Parameters

moduleGuid string

The module GUID of the ITestModule instance created by the specified factory method.

factoryMethod TestModuleActivator.TestModuleFactoryMethod

The factory method that creates ITestModule instances with the specified moduleGuid.

Register(string, TestModuleFactoryMethod, ModuleType)

Registers a new factory method that creates ITestModule instances with the specified module GUID.

public static void Register(string moduleGuid, TestModuleActivator.TestModuleFactoryMethod factoryMethod, ModuleType moduleType)

Parameters

moduleGuid string

The module GUID of the ITestModule instance created by the specified factory method.

factoryMethod TestModuleActivator.TestModuleFactoryMethod

The factory method that creates ITestModule instances with the specified moduleGuid.

moduleType ModuleType

The type of the module created by the factory method.

Register(string, TestModuleFactoryMethod, ModuleType, int)

Registers a new factory method that creates ITestModule instances with the specified module GUID.

public static void Register(string moduleGuid, TestModuleActivator.TestModuleFactoryMethod factoryMethod, ModuleType moduleType, int iteration)

Parameters

moduleGuid string

The module GUID of the ITestModule instance created by the specified factory method.

factoryMethod TestModuleActivator.TestModuleFactoryMethod

The factory method that creates ITestModule instances with the specified moduleGuid.

moduleType ModuleType

The type of the module created by the factory method.

iteration int

A number specifying the repeat count for the module created by the factory method.

ResolveFactoryMethod(CaseInsensitiveString, string, Type, IList<string>, out TestModuleAttribute)

Resolves the factory method that creates ITestModule instances with the specified module GUID and/or module.

public static TestModuleActivator.TestModuleFactoryMethod ResolveFactoryMethod(CaseInsensitiveString moduleGuid, string moduleName, Type containerType, IList<string> assemblyPathsToSearch, out TestModuleAttribute moduleAttribute)

Parameters

moduleGuid CaseInsensitiveString

The GUID of the module created by the returned factory method.

moduleName string

The name of the module created by the returned factory method.

containerType Type

A Type that resides in the same assembly as the searched test module.

assemblyPathsToSearch IList<string>

The paths to assemblies that are searched for the test module.

moduleAttribute TestModuleAttribute

When this methods returns contains the TestModuleAttribute that the found test module is marked with or null if no test module was found.

Returns

TestModuleActivator.TestModuleFactoryMethod

A factory method that can be used to create the specified ITestModule instance or null if no test module satisfying the specified arguments was found.