Skip to content

Commit 9e38034

Browse files
committed
Build fix
1 parent 16fb049 commit 9e38034

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

SpecRec/SpecRecLogsAttribute.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ private string ExtractTestCaseFromFileName(string fileName, string className, st
172172
private object[] CreateTestCaseData(IMethodInfo testMethod, CallLog callLog, string? verifiedFilePath = null)
173173
{
174174
var methodParams = testMethod.GetParameters().ToArray();
175-
var paramValues = new object[methodParams.Length];
175+
var paramValues = new object?[methodParams.Length];
176176

177177
// Detect first parameter type and create appropriate object
178178
var firstParamType = methodParams[0].ParameterType.ToRuntimeType();
@@ -205,7 +205,7 @@ private object[] CreateTestCaseData(IMethodInfo testMethod, CallLog callLog, str
205205
// Use null instead of DBNull.Value for nullable types
206206
if (parsedValue == null && IsNullableType(paramType))
207207
{
208-
paramValues[i] = null;
208+
paramValues[i] = null!;
209209
}
210210
else
211211
{
@@ -240,7 +240,7 @@ private object[] CreateTestCaseData(IMethodInfo testMethod, CallLog callLog, str
240240
// Use null for nullable types instead of DBNull.Value
241241
if (defaultValue == null && IsNullableType(paramType))
242242
{
243-
paramValues[i] = null;
243+
paramValues[i] = null!;
244244
}
245245
else
246246
{
@@ -264,7 +264,7 @@ private object[] CreateTestCaseData(IMethodInfo testMethod, CallLog callLog, str
264264
}
265265
}
266266

267-
return paramValues;
267+
return (object[])paramValues;
268268
}
269269

270270
private string GenerateSuggestedPreamble(IParameterInfo[] methodParams)

0 commit comments

Comments
 (0)