static Tests() { VerifyDiffPlex.Initialize(); VerifierSettings.DisableClipboard(); VerifierSettings.ModifySerialization( settings => settings.IgnoreMember <Exception>(_ => _.StackTrace)); }
public PlaidClientTest() { VerifierSettings.DisableClipboard(); VerifierSettings.ScrubLinesContaining(StringComparison.OrdinalIgnoreCase, "RequestId"); VerifierSettings.UseStrictJson(); var configuration = new ConfigurationBuilder() .AddEnvironmentVariables() .AddJsonFile("secrets.json", optional: true) .Build(); var plaidOptions = configuration.GetSection(PlaidOptions.SectionKey).Get <PlaidOptions>(); if (string.IsNullOrWhiteSpace(plaidOptions?.ClientId)) { throw new InvalidOperationException("Please provide ClientId configuration via PLAID__CLIENTID environment variable or Plaid:ClientId in secrets.json."); } if (string.IsNullOrWhiteSpace(plaidOptions?.Secret)) { throw new InvalidOperationException("Please provide Secret configuration via PLAID__SECRET or Plaid:Secret in secrets.json."); } if (string.IsNullOrWhiteSpace(plaidOptions?.DefaultAccessToken)) { throw new InvalidOperationException("Please provide DefaultAccessToken configuration via PLAID__DEFAULTACCESSTOKEN or Plaid:DefaultAccessToken in secrets.json."); } PlaidClient = new PlaidClient( MOptions.Create(plaidOptions)); }
void DisableClipboardGlobal() { #region DisableClipboardGlobal VerifierSettings.DisableClipboard(); #endregion }
public Task ApproveApi(string frameworkVersion) { VerifierSettings.DisableClipboard(); string codeBase = Assembly.GetExecutingAssembly().Location; var uri = new UriBuilder(new Uri(codeBase)); string assemblyPath = Uri.UnescapeDataString(uri.Path); var containingDirectory = Path.GetDirectoryName(assemblyPath); var configurationName = new DirectoryInfo(containingDirectory).Parent.Name; var assemblyFile = Path.GetFullPath( Path.Combine( GetSourceDirectory(), Path.Combine("..", "..", "Src", "FluentAssertions", "bin", configurationName, frameworkVersion, "FluentAssertions.dll"))); var assembly = Assembly.LoadFile(Path.GetFullPath(assemblyFile)); var publicApi = assembly.GeneratePublicApi(options: null); return(Verifier .Verify(publicApi) .UseDirectory(Path.Combine("ApprovedApi", "FluentAssertions")) .UseStringComparer(OnlyIncludeChanges) .UseFileName(frameworkVersion) .DisableDiff()); }
public static void Initialize() { Environment.SetEnvironmentVariable("DiffEngine_Disabled", "true"); VerifierSettings.DisableClipboard(); VerifyDiffPlex.Initialize(); }
static DisableClipboardTests() { VerifierSettings.DisableClipboard(); DiffRunner.Disabled = true; }