Prepare constructors of `AsyncFunctionAssertions` to make them protected in V7 by lg2de · Pull Request #1972 · fluentassertions/fluentassertions · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Src/FluentAssertions/Specialized/AsyncFunctionAssertions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public GenericAsyncFunctionAssertions(Func<Task<TResult>> subject, IExtractExcep
}

public GenericAsyncFunctionAssertions(Func<Task<TResult>> subject, IExtractExceptions extractor, IClock clock)
#pragma warning disable CS0618 // is currently obsolete to make it protected in Version 7
: base(subject, extractor, clock)
#pragma warning restore CS0618
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public NonGenericAsyncFunctionAssertions(Func<Task> subject, IExtractExceptions
}

public NonGenericAsyncFunctionAssertions(Func<Task> subject, IExtractExceptions extractor, IClock clock)
#pragma warning disable CS0618 // is currently obsolete to make it protected in Version 7
: base(subject, extractor, clock)
#pragma warning restore CS0618
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,11 @@ namespace FluentAssertions.Specialized
where TTask : System.Threading.Tasks.Task
where TAssertions : FluentAssertions.Specialized.AsyncFunctionAssertions<TTask, TAssertions>
{
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e removed in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor) { }
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e made protected in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor, FluentAssertions.Common.IClock clock) { }
protected override string Identifier { get; }
public System.Threading.Tasks.Task<FluentAssertions.AndConstraint<TAssertions>> CompleteWithinAsync(System.TimeSpan timeSpan, string because = "", params object[] becauseArgs) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,11 @@ namespace FluentAssertions.Specialized
where TTask : System.Threading.Tasks.Task
where TAssertions : FluentAssertions.Specialized.AsyncFunctionAssertions<TTask, TAssertions>
{
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e removed in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor) { }
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e made protected in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor, FluentAssertions.Common.IClock clock) { }
protected override string Identifier { get; }
public System.Threading.Tasks.Task<FluentAssertions.AndConstraint<TAssertions>> CompleteWithinAsync(System.TimeSpan timeSpan, string because = "", params object[] becauseArgs) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,11 @@ namespace FluentAssertions.Specialized
where TTask : System.Threading.Tasks.Task
where TAssertions : FluentAssertions.Specialized.AsyncFunctionAssertions<TTask, TAssertions>
{
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e removed in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor) { }
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e made protected in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor, FluentAssertions.Common.IClock clock) { }
protected override string Identifier { get; }
public System.Threading.Tasks.Task<FluentAssertions.AndConstraint<TAssertions>> CompleteWithinAsync(System.TimeSpan timeSpan, string because = "", params object[] becauseArgs) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2242,7 +2242,11 @@ namespace FluentAssertions.Specialized
where TTask : System.Threading.Tasks.Task
where TAssertions : FluentAssertions.Specialized.AsyncFunctionAssertions<TTask, TAssertions>
{
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e removed in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor) { }
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e made protected in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor, FluentAssertions.Common.IClock clock) { }
protected override string Identifier { get; }
public System.Threading.Tasks.Task<FluentAssertions.AndConstraint<TAssertions>> CompleteWithinAsync(System.TimeSpan timeSpan, string because = "", params object[] becauseArgs) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,11 @@ namespace FluentAssertions.Specialized
where TTask : System.Threading.Tasks.Task
where TAssertions : FluentAssertions.Specialized.AsyncFunctionAssertions<TTask, TAssertions>
{
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e removed in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor) { }
[System.Obsolete("This class is intended as base class. This ctor is accidentally public and will b" +
"e made protected in Version 7.")]
public AsyncFunctionAssertions(System.Func<TTask> subject, FluentAssertions.Specialized.IExtractExceptions extractor, FluentAssertions.Common.IClock clock) { }
protected override string Identifier { get; }
public System.Threading.Tasks.Task<FluentAssertions.AndConstraint<TAssertions>> CompleteWithinAsync(System.TimeSpan timeSpan, string because = "", params object[] becauseArgs) { }
Expand Down