Skip to content

Commit

Permalink
Typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ben_pollard committed Jan 20, 2024
1 parent e1d2021 commit 2b0c3a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions BP.AdventureFramework.Tests/Rendering/Frames/GridTextFrame_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,59 @@ namespace BP.AdventureFramework.Tests.Rendering.Frames
public class GridTextFrame_Tests
{
[TestMethod]
public void GivenUnmodifiedEnvironment_WhenIsColorSupressed_ThenReturnFalse()
public void GivenUnmodifiedEnvironment_WhenIsColorSuppressed_ThenReturnFalse()
{
var result = GridTextFrame.IsColorSupressed();
var result = GridTextFrame.IsColorSuppressed();

Assert.IsFalse(result);
}

[TestMethod]
public void GivenNoColorEnvironmentVariableSetToEmptyString_WhenIsColorSupressed_ThenReturnFalse()
public void GivenNoColorEnvironmentVariableSetToEmptyString_WhenIsColorSuppressed_ThenReturnFalse()
{
Environment.SetEnvironmentVariable(GridTextFrame.NO_COLOR, "");

var result = GridTextFrame.IsColorSupressed();
var result = GridTextFrame.IsColorSuppressed();

Assert.IsFalse(result);
}

[TestMethod]
public void GivenNoColorEnvironmentVariableSetTo0_WhenIsColorSupressed_ThenReturnFalse()
public void GivenNoColorEnvironmentVariableSetTo0_WhenIsColorSuppressed_ThenReturnFalse()
{
Environment.SetEnvironmentVariable(GridTextFrame.NO_COLOR, "0");

var result = GridTextFrame.IsColorSupressed();
var result = GridTextFrame.IsColorSuppressed();

Assert.IsFalse(result);
}

[TestMethod]
public void GivenNoColorEnvironmentVariableSetToFalse_WhenIsColorSupressed_ThenReturnFalse()
public void GivenNoColorEnvironmentVariableSetToFalse_WhenIsColorSuppressed_ThenReturnFalse()
{
Environment.SetEnvironmentVariable(GridTextFrame.NO_COLOR, "False");

var result = GridTextFrame.IsColorSupressed();
var result = GridTextFrame.IsColorSuppressed();

Assert.IsFalse(result);
}

[TestMethod]
public void GivenNoColorEnvironmentVariableSetTo1_WhenIsColorSupressed_ThenReturnTrue()
public void GivenNoColorEnvironmentVariableSetTo1_WhenIsColorSuppressed_ThenReturnTrue()
{
Environment.SetEnvironmentVariable(GridTextFrame.NO_COLOR, "1");

var result = GridTextFrame.IsColorSupressed();
var result = GridTextFrame.IsColorSuppressed();

Assert.IsTrue(result);
}

[TestMethod]
public void GivenNoColorEnvironmentVariableSetToTrue_WhenIsColorSupressed_ThenReturnTrue()
public void GivenNoColorEnvironmentVariableSetToTrue_WhenIsColorSuppressed_ThenReturnTrue()
{
Environment.SetEnvironmentVariable(GridTextFrame.NO_COLOR, "True");

var result = GridTextFrame.IsColorSupressed();
var result = GridTextFrame.IsColorSuppressed();

Assert.IsTrue(result);
}
Expand Down
4 changes: 2 additions & 2 deletions BP.AdventureFramework/Rendering/Frames/GridTextFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public GridTextFrame(GridStringBuilder builder, int cursorLeft, int cursorTop, R
/// Determine if color is suppressed. If the NO_COLOR environment variable is present and set to anything other than '0' or 'false' this will return true.
/// </summary>
/// <returns>True if the NO_COLOR ebviroment variable is present and set to anything other than '0' or 'false', else false.</returns>
internal static bool IsColorSupressed()
internal static bool IsColorSuppressed()
{
var value = Environment.GetEnvironmentVariable(NO_COLOR)?.ToLower() ?? string.Empty;

Expand Down Expand Up @@ -132,7 +132,7 @@ public override string ToString()
/// <param name="writer">The writer.</param>
public void Render(TextWriter writer)
{
var renderInColor = !IsColorSupressed();
var renderInColor = !IsColorSuppressed();
var cursorVisible = Console.CursorVisible;
var startColor = Console.ForegroundColor;

Expand Down

0 comments on commit 2b0c3a5

Please sign in to comment.