refactor: Fix unused member variable inspection issue

pull/201/head
Robert Dailey 2 years ago
parent c05d73a84b
commit 4275336a8a

@ -0,0 +1,18 @@
using FluentAssertions;
using NUnit.Framework;
using Recyclarr.TrashLib.Config.EnvironmentVariables;
namespace Recyclarr.TrashLib.Tests.Config.EnvironmentVariables;
[TestFixture]
[Parallelizable(ParallelScope.All)]
public class EnvironmentVariableNotDefinedExceptionTest
{
[Test]
public void Properties_get_initialized()
{
var sut = new EnvironmentVariableNotDefinedException(15, "key");
sut.Line.Should().Be(15);
sut.EnvironmentVariableName.Should().Be("key");
}
}

@ -5,11 +5,10 @@ public class EnvironmentVariableNotDefinedException : Exception
public int Line { get; }
public string EnvironmentVariableName { get; }
public EnvironmentVariableNotDefinedException(int line, string environmentVariableName)
: base(
$"Line {line} refers to undefined environment variable {environmentVariableName} and no default is specified.")
public EnvironmentVariableNotDefinedException(int line, string envVarName)
: base($"Line {line} refers to undefined environment variable {envVarName} and no default is specified.")
{
Line = line;
EnvironmentVariableName = environmentVariableName;
EnvironmentVariableName = envVarName;
}
}

Loading…
Cancel
Save