fluentasserts.core.operations.beNull 11/11(100%) line coverage

      
10
20
30
40
50
60
70
80
90
100
1117
120
1330
140
1517
1610
170
180
1917
2010
210
220
237
240
257
267
277
280
290
307
310
module fluentasserts.core.operations.beNull; import fluentasserts.core.results; import fluentasserts.core.evaluation; import fluentasserts.core.lifecycle; import std.algorithm; /// IResult[] beNull(ref Evaluation evaluation) @safe nothrow { evaluation.message.addText("."); auto result = evaluation.currentValue.typeNames.canFind("null") || evaluation.currentValue.strValue == "null"; if(evaluation.isNegated) { result = !result; } if(result) { return []; } IResult[] results = []; try results ~= new ExpectedActualResult( evaluation.isNegated ? "not null" : "null", evaluation.currentValue.typeNames.length ? evaluation.currentValue.typeNames[0] : "unknown"); catch(Exception) {} return results; }