/// <summary> /// Gets a flag that determines the default display name format for test methods. /// </summary> public static TestMethodDisplay?GetMethodDisplay(this _ITestFrameworkDiscoveryOptions discoveryOptions) { Guard.ArgumentNotNull(discoveryOptions); var methodDisplayString = discoveryOptions.GetValue <string>(TestOptionsNames.Discovery.MethodDisplay); return(methodDisplayString != null ? (TestMethodDisplay?)Enum.Parse(typeof(TestMethodDisplay), methodDisplayString) : null); }
/// <summary> /// Gets a flag that determines whether internal diagnostic messages will be emitted. /// </summary> public static bool?GetInternalDiagnosticMessages(this _ITestFrameworkDiscoveryOptions discoveryOptions) { Guard.ArgumentNotNull(discoveryOptions); return(discoveryOptions.GetValue <bool?>(TestOptionsNames.Discovery.InternalDiagnosticMessages)); }
/// <summary> /// Gets a flag that determines whether discovered test cases should include source information. /// Note that not all runners have access to source information, so this flag does not guarantee /// that source information will be provided. /// </summary> public static bool?GetIncludeSourceInformation(this _ITestFrameworkDiscoveryOptions discoveryOptions) { Guard.ArgumentNotNull(discoveryOptions); return(discoveryOptions.GetValue <bool?>(TestOptionsNames.Discovery.IncludeSourceInformation)); }
// Read/write methods for discovery options /// <summary> /// Gets the culture to use for discovering tests. <c>null</c> uses the default OS culture; /// <see cref="string.Empty"/> uses the invariant culture; any other value passes the /// provided value to <see cref="CultureInfo(string)"/> and uses the resulting object /// with <see cref="CultureInfo.DefaultThreadCurrentCulture"/> and /// <see cref="CultureInfo.DefaultThreadCurrentUICulture"/>. /// </summary> public static string?GetCulture(this _ITestFrameworkDiscoveryOptions discoveryOptions) { Guard.ArgumentNotNull(discoveryOptions); return(discoveryOptions.GetValue <string?>(TestOptionsNames.Discovery.Culture)); }
/// <summary> /// Gets a flag that determines whether xUnit.net should report test results synchronously. /// </summary> public static bool?GetSynchronousMessageReporting(this _ITestFrameworkDiscoveryOptions discoveryOptions) { Guard.ArgumentNotNull(discoveryOptions); return(discoveryOptions.GetValue <bool?>(TestOptionsNames.Discovery.SynchronousMessageReporting)); }
/// <summary> /// Gets a flag that determines whether theories are pre-enumerated. If they enabled, then the /// discovery system will return a test case for each row of test data; they are disabled, then the /// discovery system will return a single test case for the theory. /// </summary> public static bool?GetPreEnumerateTheories(this _ITestFrameworkDiscoveryOptions discoveryOptions) { Guard.ArgumentNotNull(discoveryOptions); return(discoveryOptions.GetValue <bool?>(TestOptionsNames.Discovery.PreEnumerateTheories)); }