-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new event for actors to record assets
This allows files which are generated by performables to be recorded along with the Screenplay report. For example, things like screenshots or logs or other generated file data.
- Loading branch information
1 parent
ec7788b
commit 81e1350
Showing
8 changed files
with
161 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
CSF.Screenplay.Abstractions/Actors/PerformableAssetEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
|
||
namespace CSF.Screenplay.Actors | ||
{ | ||
/// <summary> | ||
/// Event arguments which represent the revealing of a file asset which relates to a performable. | ||
/// </summary> | ||
/// <seealso cref="ICanPerform.RecordAsset(object, string, string)"/> | ||
public class PerformableAssetEventArgs : PerformableEventArgs | ||
{ | ||
/// <summary> | ||
/// Gets a full/absolute path to the asset file. | ||
/// </summary> | ||
public string FilePath { get; } | ||
|
||
/// <summary> | ||
/// Gets an optional human-readable summary of what this asset represents. This should be one sentence at most, suitable | ||
/// for display in a UI tool-tip. | ||
/// </summary> | ||
public string FileSummary { get; } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of <see cref="PerformableAssetEventArgs"/>. | ||
/// </summary> | ||
/// <param name="actorName">The actor's name</param> | ||
/// <param name="performanceIdentity">The actor's performance identity</param> | ||
/// <param name="performable">The performable item</param> | ||
/// <param name="filePath">The full absolute path to the asset file</param> | ||
/// <param name="fileSummary">An optional human-readable summary of the asset file</param> | ||
/// <param name="phase">The phase of performance</param> | ||
public PerformableAssetEventArgs(string actorName, | ||
Guid performanceIdentity, | ||
object performable, | ||
string filePath, | ||
string fileSummary = null, | ||
PerformancePhase phase = PerformancePhase.Unspecified) : base(actorName, performanceIdentity, performable, phase) | ||
{ | ||
FilePath = filePath ?? throw new ArgumentNullException(nameof(filePath)); | ||
FileSummary = fileSummary; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters