Skip to content

Commit 77d9649

Browse files
fix broken test
1 parent 52a5e11 commit 77d9649

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/TestStack.BDDfy/Scanners/StepScanners/ArgumentCleaningExtensions.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal static object[] FlattenArrays(this IEnumerable<object> inputs)
1111
return [.. inputs.Select(FlattenArray)];
1212
}
1313

14-
public static object FlattenArray(this object input)
14+
public static object FlattenArray(this object? input)
1515
{
1616
if (input is Array inputArray)
1717
{
@@ -22,7 +22,7 @@ public static object FlattenArray(this object input)
2222
return GetSafeValue(input);
2323
}
2424

25-
static object GetSafeValue(object input) => input switch
25+
static object GetSafeValue(object? input) => input switch
2626
{
2727
null => "<null>",
2828
string s => s == "" ? "<empty>" : (s.Trim() == "" ? $"'{s}'" : s),

‎src/TestStack.BDDfy/Scanners/StepScanners/Examples/ExampleValue.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ public class ExampleValue(string header, object? underlyingValue, Func<int> getR
5555

5656
public override string ToString() => string.Join("{0}: {1}", Header, _underlyingValue);
5757

58-
public string? GetValueAsString() => _underlyingValue?.FlattenArray().ToString();
58+
public string? GetValueAsString() => _underlyingValue.FlattenArray().ToString();
5959
}
6060
}

‎src/TestStack.BDDfy/Step.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace TestStack.BDDfy
77
public class Step
88
{
99
private readonly StepTitle _stepTitle;
10-
private string _title;
10+
private string? _title;
1111
public Step(
1212
Func<object, object> action,
1313
StepTitle stepTitle,
@@ -45,7 +45,7 @@ public Step(Step step)
4545
public string Title => _title??= _stepTitle;
4646
public ExecutionOrder ExecutionOrder { get; private set; }
4747
public Result Result { get; set; }
48-
public Exception Exception { get; set; }
48+
public Exception? Exception { get; set; }
4949
public int ExecutionSubOrder { get; set; }
5050
public TimeSpan Duration { get; set; }
5151
public List<StepArgument> Arguments { get; private set; }

0 commit comments

Comments
 (0)