-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Builder for Snapshot #141
base: master
Are you sure you want to change the base?
Conversation
SonarCloud Quality Gate failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do a small refactoring and write also some tests for it. especially naming etc.
/// <summary> | ||
/// Initializes a builder to configure the snapshot | ||
/// </summary> | ||
/// <param name="target"></param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
params not commented :)
/// Initializes a builder to configure the snapshot | ||
/// </summary> | ||
/// <param name="target"></param> | ||
/// <returns></returns> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Returns not commented :)
/// <summary> | ||
/// Initializes a builder to configure the snapshot | ||
/// </summary> | ||
/// <param name="target"></param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Param not commented :)
/// Initializes a builder to configure the snapshot | ||
/// </summary> | ||
/// <param name="target"></param> | ||
/// <returns></returns> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returns not commented :)
/// </summary> | ||
/// <param name="configure"></param> | ||
/// <returns></returns> | ||
ISnapshotBuilder ConfigureOptions(Func<MatchOptions, MatchOptions> configure); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could make this ConfigureOptions private (but we need a little refactoring then)
/// <summary> | ||
/// Configures the name extension | ||
/// </summary> | ||
/// <param name="extensions"></param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
param & returns empty
/// <returns></returns> | ||
public static ISnapshotBuilder NameExtension( | ||
this ISnapshotBuilder builder, | ||
string extensions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a params string[]
|
||
/// <summary> | ||
/// Configures the name extension. The value passed as <paramref name="extensions"/> will be | ||
/// added to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description is not finished.
/// <summary> | ||
/// Configures the name of this snapshot | ||
/// </summary> | ||
/// <param name="extensions"></param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename extensions to 'name'
namespace Snapshooter | ||
{ | ||
public static class SnapshotBuilderExtensions | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should include the extensions to the ISnapshotBuilder interface and add it to the SnapshotBuilder. Then we could make the ConfigureOptions as a protected field and we can remove it from the interface.
It would also have the advantage, that if someone checks the ISnapshotBuilder interface (which options do exists), then the person sees immediately what kind of functions are there.
Add Builder for Snapshots