需要使用moq和xunit为以下代码编写测试用例。代码覆盖率中未涵盖return null
public static StreamReader GetStream(System.Reflection.Assembly assembly, string name)
{
foreach (string resName in assembly.GetManifestResourceNames())
{
if (resName.EndsWith(name))
{
return new System.IO.StreamReader(assembly.GetManifestResourceStream(resName));
}
}
return null;
}