Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
Fixing Stylecop issues
Browse files Browse the repository at this point in the history
references #10
  • Loading branch information
pvandervelde committed Jun 9, 2019
1 parent dc32fe6 commit 15ddc74
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 32 deletions.
4 changes: 2 additions & 2 deletions src/nuclei.nunit.extensions/ChiSquareTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public ChiSquareTest(double expected, ICollection<double> actual, int numberOfCo
{
if (expected <= 0.0)
{
throw new ArgumentOutOfRangeException("expected", "The expected value is negative.");
throw new ArgumentOutOfRangeException(nameof(expected), "The expected value is negative.");
}

if (actual == null)
{
throw new ArgumentNullException("actual");
throw new ArgumentNullException(nameof(actual));
}

_degreesOfFreedom = actual.Count - numberOfConstraints;
Expand Down
2 changes: 1 addition & 1 deletion src/nuclei.nunit.extensions/ExceptionContractVerifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void HasDefaultConstructor()
var constructor = typeof(TException).GetConstructor(
BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic,
null,
new Type[0],
Array.Empty<Type>(),
null);
Assert.NotNull(constructor);
}
Expand Down
10 changes: 5 additions & 5 deletions src/nuclei.nunit.extensions/Gamma.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public static double IncompleteGamma(double a, double x)
{
if (x < 0.0)
{
throw new ArgumentOutOfRangeException("x");
throw new ArgumentOutOfRangeException(nameof(x));
}

if (a <= 0.0)
{
throw new ArgumentOutOfRangeException("a");
throw new ArgumentOutOfRangeException(nameof(a));
}

if (x < (a + 1.0))
Expand Down Expand Up @@ -82,14 +82,14 @@ private static double IncompleteGammaContinuedFraction(double a, double x)
}
}

throw new ArgumentOutOfRangeException("a", "Value too large.");
throw new ArgumentOutOfRangeException(nameof(a), "Value too large.");
}

private static double IncompleteGammaSeries(double a, double x)
{
if (x < 0.0)
{
throw new ArgumentOutOfRangeException("x");
throw new ArgumentOutOfRangeException(nameof(x));
}

double num = a;
Expand All @@ -106,7 +106,7 @@ private static double IncompleteGammaSeries(double a, double x)
}
}

throw new ArgumentOutOfRangeException("a", "Value too large.");
throw new ArgumentOutOfRangeException(nameof(a), "Value too large.");
}
}
}
24 changes: 0 additions & 24 deletions src/nuclei.nunit.extensions/NotEnoughHashesException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Runtime.Serialization;

namespace Nuclei.Nunit.Extensions
{
Expand All @@ -20,7 +19,6 @@ namespace Nuclei.Nunit.Extensions
/// project which is licensed under the Apache License 2.0. More information can be found at:
/// https://code.google.com/p/mb-unit/.
/// </remarks>
[Serializable]
[SuppressMessage(
"Microsoft.StyleCop.CSharp.DocumentationRules",
"SA1600:ElementsMustBeDocumented",
Expand Down Expand Up @@ -68,27 +66,5 @@ public NotEnoughHashesException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="NotEnoughHashesException"/> class.
/// </summary>
/// <param name="info">
/// The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized
/// object data about the exception being thrown.
/// </param>
/// <param name="context">
/// The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual
/// information about the source or destination.
/// </param>
/// <exception cref="T:System.ArgumentNullException">
/// The <paramref name="info"/> parameter is null.
/// </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">
/// The class name is null or <see cref="P:System.Exception.HResult"/> is zero (0).
/// </exception>
private NotEnoughHashesException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}

0 comments on commit 15ddc74

Please sign in to comment.