Exemple #1
0
        [Test] public void register_GitHub_As_ExternalAssemblerResolver()
        {
            var targetAssembly  = "BasicCacher.dll";
            var currentLocation = AssemblyResolver.NameResolver(targetAssembly);       // check if it has been downloaded before and delete it if it had

            if (currentLocation.fileExists())
            {
                currentLocation.file_Delete();
            }
            currentLocation.assert_File_Not_Exists();


            assert_Not_Null(AssemblyResolver.ExternalAssemblerResolver);
            AssemblyResolver.ExternalAssemblerResolver.clear();

            assert_Is_Empty(AssemblyResolver.ExternalAssemblerResolver);

            O2GitHub.register_GitHub_As_ExternalAssemblerResolver();

            assert_Is_Not_Empty(AssemblyResolver.ExternalAssemblerResolver);

            assert_Null("System.dll".resolve_Assembly_Using_ExternalAssemblerResolver());
            assert_Not_Null(targetAssembly.resolve_Assembly_Using_ExternalAssemblerResolver());

            assert_Size_Is(AssemblyResolver.ExternalAssemblerResolver, 1);

            //calling it again, should not add a duplicate resolver
            O2GitHub.register_GitHub_As_ExternalAssemblerResolver();
            assert_Size_Is(AssemblyResolver.ExternalAssemblerResolver, 1);
        }
Exemple #2
0
 public static void register_GitHub_As_ExternalAssemblerResolver()
 {
     O2GitHub.register_GitHub_As_ExternalAssemblerResolver();
 }