void DeriveTestDirectory() { #region DeriveTestDirectory VerifierSettings.DeriveTestDirectory( (sourceFile, projectDirectory) => { var snapshotsDirectory = Path.Combine(projectDirectory, "Snapshots"); Directory.CreateDirectory(snapshotsDirectory); return(Path.Combine(snapshotsDirectory)); }); #endregion }
public async Task DeriveTestDirectory() { string?receivedSourceFile = null; string?receivedProjectDirectory = null; VerifierSettings.DeriveTestDirectory( (sourceFile, projectDirectory) => { receivedSourceFile = sourceFile; receivedProjectDirectory = projectDirectory; return(Path.GetDirectoryName(sourceFile)); }); await Verifier.Verify("DeriveTestDirectory"); Assert.NotNull(receivedSourceFile); Assert.True(Directory.Exists(receivedProjectDirectory)); }