Skip to content

Commit 7eb3266

Browse files
committed
Supress some warnings in tests
1 parent 5bde65e commit 7eb3266

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

tests/NSubstitute.Acceptance.Specs/CompatArgsTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
namespace NSubstitute.Acceptance.Specs;
77

8+
#pragma warning disable CS0618 // Type or member is obsolete
89

910
public class CompatArgsTests
1011
{
@@ -15,6 +16,7 @@ public void CompatAndCompatArgInstanceShouldBeInSync()
1516
var flags = BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
1617
var compatMembers =
1718
typeof(Arg.Compat).GetMethods(flags).Select(DescribeMethod).OrderBy(x => x);
19+
1820
var compatInstanceMembers =
1921
typeof(CompatArg).GetMethods(flags).Select(DescribeMethod).OrderBy(x => x);
2022

tests/NSubstitute.Acceptance.Specs/EventRaising.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,9 @@ public interface IEventSamples
361361
public delegate int FuncDelegateWithArgs(int intArg, string stringArg);
362362
public delegate void CustomEventThatDoesNotInheritFromEventHandler(object sender, CustomEventArgs args);
363363
public class CustomEventArgs : EventArgs { }
364+
#pragma warning disable CS9113 // Parameter is unread.
364365
public class CustomEventArgsWithNoDefaultCtor(string arg) : EventArgs
366+
#pragma warning restore CS9113 // Parameter is unread.
365367
{
366368
}
367369

tests/NSubstitute.Acceptance.Specs/FieldReports/MigratingToCompatArgs.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
namespace NSubstitute.Acceptance.Specs.FieldReports;
55

6+
#pragma warning disable CS0618 // Type or member is obsolete
67

78
/// <summary>
89
/// Can migrate from the old <see cref="Arg"/> matchers to <see cref="Arg.Compat"/> by putting a

0 commit comments

Comments
 (0)