public void FindSatelliteAssemblies_None() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Empty(results); }
public void FindSatelliteAssemblies_None() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 0, actual: results.Length); }
public void FindSatelliteAssemblies_WrongIntermediateDirectoryName() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFile = directory.CreateDirectory("de").CreateDirectory("OtherAssembly.resources").CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 0, actual: results.Length); }
public void FindSatelliteAssemblies_DoesNotIncludeFileInSameDirectory() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFile = directory.CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 0, actual: results.Length); }
public void FindSatelliteAssemblies_TwoLevelsDown() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFile = directory.CreateDirectory("de").CreateDirectory("FakeAssembly.resources").CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); AssertEx.SetEqual(new[] { satelliteFile.Path }, results, StringComparer.OrdinalIgnoreCase); }
public void FindSatelliteAssemblies_TwoLevelsDown() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFile = directory.CreateDirectory("de").CreateDirectory("FakeAssembly.resources").CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 1, actual: results.Length); Assert.Equal(expected: satelliteFile.Path, actual: results[0], comparer: StringComparer.OrdinalIgnoreCase); }
public void FindSatelliteAssemblies_MultipleAssemblies() { var directory = Temp.CreateDirectory(); var assemblyFile = directory.CreateFile("FakeAssembly.dll"); var satelliteFileDE = directory.CreateDirectory("de").CreateFile("FakeAssembly.resources.dll"); var satelliteFileFR = directory.CreateDirectory("fr").CreateFile("FakeAssembly.resources.dll"); var results = AssemblyUtilities.FindSatelliteAssemblies(assemblyFile.Path); Assert.Equal(expected: 2, actual: results.Length); Assert.Contains(satelliteFileDE.Path, results, StringComparer.OrdinalIgnoreCase); Assert.Contains(satelliteFileFR.Path, results, StringComparer.OrdinalIgnoreCase); }