Skip to content
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

Prepare constructors of AsyncFunctionAssertions to make them protected in V7 #1972

Merged
merged 1 commit into from Aug 15, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions Src/FluentAssertions/Specialized/AsyncFunctionAssertions.cs
Expand Up @@ -15,11 +15,13 @@ public class AsyncFunctionAssertions<TTask, TAssertions> : DelegateAssertionsBas
where TTask : Task
where TAssertions : AsyncFunctionAssertions<TTask, TAssertions>
{
[Obsolete("This class is intended as base class. This ctor is accidentally public and will be removed in Version 7.")]
public AsyncFunctionAssertions(Func<TTask> subject, IExtractExceptions extractor)
: this(subject, extractor, new Clock())
{
}

[Obsolete("This class is intended as base class. This ctor is accidentally public and will be made protected in Version 7.")]
public AsyncFunctionAssertions(Func<TTask> subject, IExtractExceptions extractor, IClock clock)
: base(subject, extractor, clock)
{
Expand Down
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
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
{
}
}
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
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
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
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
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
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