public virtual String this[String name] { get { ITestProperty property = pinternal.Get(name); if (property != null) { return(StringEx.ToString(property.Value)); } return(null); } set { this.Add(name).Value = value; } }
private void InitializeFromLtmContext() { ITestProperties testProperties = (new LtmContext() as ITestProperties); var inits = testProperties.Get("Alias/InitString"); if (inits != null) { foreach (var kvp in InitStringUtilities.ParseInitString((string)(inits.Value))) { this.props[kvp.Key] = kvp.Value; } } }
private Func <TestItem, bool> GetTestItemFilter() { ITestProperties props = (ITestProperties)(new LtmContext()); int maxPriority = int.MaxValue; var maxPriorityArgument = props.Get("CommandLine/MaxPriority"); if (maxPriorityArgument != null) { if (!int.TryParse((string)maxPriorityArgument.Value, out maxPriority)) { maxPriority = int.MaxValue; LtmLogger.Instance.WriteLine(Common.LogLevel.Warning, "Unable to parse MaxPriority command line argument '{0}'. Must be an integer.", maxPriorityArgument.Value); } } return(item => { return item.Metadata.Priority <= maxPriority; }); }