protected TestBuilder(TestPathType type, string identifier, string name, ITestParameter parameter, TestFlags flags = DefaultFlags) { PathType = type; Identifier = identifier; Name = name; Flags = flags; Parameter = parameter; }
protected TestHost(TestPathType type, string identifier, string name, string parameterType, TestFlags flags = TestFlags.None) { PathType = type; Identifier = identifier; Name = name; ParameterType = parameterType; Flags = flags; }
public static string GetTestDataDir(TestPathType pathType = TestPathType.MethodAndClassName) { var result = TestContext.CurrentContext.TestDirectory + "/../../TestData/"; if (pathType.HasFlag(TestPathType.ClassName)) { var className = TestContext.CurrentContext.Test.ClassName; result += className.Substring(className.LastIndexOf('.') + 1) + "/"; } if (pathType.HasFlag(TestPathType.MethodName)) { result += TestContext.CurrentContext.Test.MethodName + "/"; } return(result); }
/// <summary> /// Initializes a new instance of the TestPath class. /// </summary> /// <param name="type">Whether to include or exclude the test path</param> /// <param name="path">Test path to set</param> public TestPath(TestPathType type, string path) { this.PathType = type; this.Value = path; }
static string WritePathType(TestPathType type) { return(Enum.GetName(typeof(TestPathType), type).ToLowerInvariant()); }
public HeavyTestHost(TestPathType pathType, string identifier, string name, Type type, Type hostType, TestFlags flags) : base(pathType, identifier, name, TestPath.GetFriendlyName(hostType), flags) { Type = type; }
/// <summary> /// Initializes a new instance of the TestPath class. /// </summary> /// <param name="type">Whether to include or exclude the test path</param> /// <param name="path">Test path to set</param> public TestPath(TestPathType type, string path) { this.PathType = type; this.Value = path; }