Skip to content

Commit

Permalink
Supress some warnings in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Romfos committed Sep 14, 2024
1 parent 5bde65e commit 7eb3266
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/NSubstitute.Acceptance.Specs/CompatArgsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace NSubstitute.Acceptance.Specs;

#pragma warning disable CS0618 // Type or member is obsolete

public class CompatArgsTests
{
Expand All @@ -15,6 +16,7 @@ public void CompatAndCompatArgInstanceShouldBeInSync()
var flags = BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
var compatMembers =
typeof(Arg.Compat).GetMethods(flags).Select(DescribeMethod).OrderBy(x => x);

var compatInstanceMembers =
typeof(CompatArg).GetMethods(flags).Select(DescribeMethod).OrderBy(x => x);

Expand Down
2 changes: 2 additions & 0 deletions tests/NSubstitute.Acceptance.Specs/EventRaising.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ public interface IEventSamples
public delegate int FuncDelegateWithArgs(int intArg, string stringArg);
public delegate void CustomEventThatDoesNotInheritFromEventHandler(object sender, CustomEventArgs args);
public class CustomEventArgs : EventArgs { }
#pragma warning disable CS9113 // Parameter is unread.
public class CustomEventArgsWithNoDefaultCtor(string arg) : EventArgs
#pragma warning restore CS9113 // Parameter is unread.
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

namespace NSubstitute.Acceptance.Specs.FieldReports;

#pragma warning disable CS0618 // Type or member is obsolete

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

0 comments on commit 7eb3266

Please sign in to comment.