public void FindGhostAssemblyLocation(string assemblyName, string ghostAssemblyPaths, string filesExist, string expect) { var appPath = getDirectory(typeof(GhostAssemblyLoader).Assembly); ghostAssemblyPaths = ghostAssemblyPaths?.Replace("$(AppPath)", appPath); filesExist = filesExist.Replace("$(AppPath)", appPath); expect = expect?.Replace("$(AppPath)", appPath); foreach (var path in filesExist.Split(';')) { staticMock.For(() => File.Exists(path)).Returns(true); } using (var ghostAssemblyLoader = new GhostAssemblyLoader(ghostAssemblyPaths, assemblyName)) { var assemblyFile = ghostAssemblyLoader.FindGhostAssemblyLocation(assemblyName); Assert.That(assemblyFile, Is.EqualTo(expect)); } }