RunnerUtilsGetOriginalPath Method

Typemock Isolator Developer Guide
Find Original Path of Assembly while in test.

Namespace:  TypeMock
Assembly:  Typemock.ArrangeActAssert (in Typemock.ArrangeActAssert.dll) Version: 9.3.6.0 (9.3.6.0)
Syntax

public static string GetOriginalPath(
	Assembly assembly
)

Parameters

assembly
Type: System.ReflectionAssembly
An Assembly that is part of the test

Return Value

Type: String
path to original location
Remarks

Typemock Smart Runner, copies all assemblies to a shadow copy in order to allow developers to continue to build while the tests are run. This is a helper method to reach original location
Examples

[Test] public void Test_That_Calls_A_File() { var fileLocation = RunnerUtils.GetOriginalPath(typeof(UnderTest).Assembly); var file = Path.Combine(Path.GetDirectoryName(fileLocation), "mydatabase.db"); var result = UnderTest.ReadAllUsersIn(file); // Assert }
See Also

Reference