Skip to content

Commit

Permalink
fix: review feedback 1
Browse files Browse the repository at this point in the history
  • Loading branch information
bmazzarol committed Jan 8, 2025
1 parent 369b691 commit f8db8a1
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public static bool TryParse(
return true;
}
refined = default!;
refined = default;
failureMessage = {{(model.PredicateReturnsFailureMessage ? "fm" : $"${model.FailureMessage}")}};
return false;
}
Expand Down Expand Up @@ -208,9 +208,9 @@ public override int GetHashCode()

private const string FormattingMembers = """
/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
""";
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"The boolean value must be 'False', instead found '{value}'";
return false;
}
Expand Down Expand Up @@ -114,8 +114,8 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"The boolean value must be 'True', instead found '{value}'";
return false;
}
Expand Down Expand Up @@ -114,8 +114,8 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = fm;
return false;
}
Expand Down Expand Up @@ -114,8 +114,8 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"Must be true";
return false;
}
Expand Down Expand Up @@ -114,8 +114,8 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"`{value}` is not a whitespace character";
return false;
}
Expand Down Expand Up @@ -114,8 +114,8 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"The widget must have a valid Id and Name";
return false;
}
Expand Down Expand Up @@ -114,8 +114,8 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"The value must be a valid date, but was '{value}'";
return false;
}
Expand Down Expand Up @@ -132,9 +132,9 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions Tuxedo.Tests/GuidStringTests.Case3#GuidString.g.verified.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"The value must be a valid GUID, but was '{value}'";
return false;
}
Expand Down Expand Up @@ -132,9 +132,9 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions Tuxedo.Tests/OddNumberExample.Case4#Odd.g.verified.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"The number must be an odd number, but was '{value}'";
return false;
}
Expand Down Expand Up @@ -115,8 +115,8 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
}
6 changes: 3 additions & 3 deletions Tuxedo.Tests/OddNumberExample.Case5#Odd.g.verified.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"The number must be an odd number, but was '{value}'";
return false;
}
Expand Down Expand Up @@ -116,8 +116,8 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static bool TryParse(
return true;
}

refined = default!;
refined = default;
failureMessage = $"The string must be at least 8 characters long, contain at most 1 uppercase letter, number and special character. You provided '{value}'.";
return false;
}
Expand Down Expand Up @@ -114,8 +114,8 @@ public override int GetHashCode()
}

/// <inheritdoc />
public override string? ToString()
public override string ToString()
{
return _value?.ToString();
return _value?.ToString() ?? string.Empty;
}
}

0 comments on commit f8db8a1

Please sign in to comment.