public void Load_CanLoadAssemblyByName_AfterLoadingByPath()
        {
            using (var directory = TempDirectory.Create())
            {
                // Arrange
                var alphaFilePath = LoaderTestResources.Alpha.WriteToFile(directory.DirectoryPath, "Alpha.dll");

                var loader    = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.DirectoryPath, "shadow"));
                var assembly1 = loader.LoadFromPath(alphaFilePath);

                // Act
                var assembly2 = loader.Load(assembly1.FullName);

                // Assert
                Assert.Same(assembly1, assembly2);
            }
        }
        public void LoadFromPath_DoesNotAddDuplicates_AfterLoadingByName()
        {
            using (var directory = TempDirectory.Create())
            {
                // Arrange
                var alphaFilePath  = LoaderTestResources.Alpha.WriteToFile(directory.DirectoryPath, "Alpha.dll");
                var alphaFilePath2 = LoaderTestResources.Alpha.WriteToFile(directory.DirectoryPath, "Alpha2.dll");

                var loader = new TestDefaultExtensionAssemblyLoader(Path.Combine(directory.DirectoryPath, "shadow"));
                loader.AddAssemblyLocation(alphaFilePath);

                var assembly1 = loader.Load("Alpha");

                // Act
                var assembly2 = loader.LoadFromPath(alphaFilePath2);

                // Assert
                Assert.Same(assembly1, assembly2);
            }
        }