Exemple #1
0
        public void AssemblyInstallationTest()
        {
            Assembly current = Assembly.GetExecutingAssembly();

            Assembly toLoad = null;

            AzureGAC azureGAC = new AzureGAC(connString);
            bool     res      = azureGAC.TryLoadAssembly(current.FullName, out toLoad);

            Assert.IsFalse(res);
            Assert.IsNull(toLoad);

            AzureGAC.Install(connString, current);
            res = azureGAC.TryLoadAssembly(current.FullName, out toLoad);
            Assert.IsTrue(res);
            Assert.IsNotNull(toLoad);

            var someExtractedData = toLoad.GetExportedTypes();
        }
Exemple #2
0
        public void DoubleInstallationTest()
        {
            Assembly current = Assembly.LoadFile(System.IO.Path.GetFullPath("testAss1.exe"));

            Assembly toLoad = null;

            AzureGAC azureGAC = new AzureGAC(connString);
            bool     res      = azureGAC.TryLoadAssembly(current.FullName, out toLoad);

            Assert.IsFalse(res);
            Assert.IsNull(toLoad);

            AzureGAC.Install(connString, current);
            AzureGAC.Install(connString, current);
            res = azureGAC.TryLoadAssembly(current.FullName, out toLoad);
            Assert.IsTrue(res);
            Assert.IsNotNull(toLoad);

            var someExtractedData = toLoad.GetExportedTypes();
        }