public void Setup() { _assembly = Substitute.For <IAssemblyInstance>(); _assembly.GetManifestResourceNames().Returns(_resourceNames); _assembly.GetManifestResourceStream(Arg.Is <string>(x => _resourceNames[0].EndsWith(x))).Returns(BuildStream(_resourceData[0])); _assembly.GetManifestResourceStream(Arg.Is <string>(x => _resourceNames[1].EndsWith(x))).Returns(BuildStream(_resourceData[1])); _assembly.GetManifestResourceStream(Arg.Is <string>(x => _resourceNames[2].EndsWith(x))).Returns(BuildStream(_resourceData[2])); }
public static string[] GetEmbeddedResourceNames(IAssemblyInstance assembly) { return(assembly?.GetManifestResourceNames()); }