language-extensions/R/test/src/RExtensionLibraryApiTests.cpp
//----------------------------------------------------------------------------------------------
// Name: InstallPublicPrivate
//
// Description:
//  Installs package to public and makes sure its loaded from public path. 
//  Then installs to private path without uninstalling from public.
//  This time makes sure it is loaded from private.
//
InstallPublicPrivate
Description:
Installs package to public and makes sure its loaded from public path.
Then installs to private path without uninstalling from public.
This time makes sure it is loaded from private.
InstallPublicPrivate Description : Installs package to public and makes sure its loaded from public path . Then installs to private path without uninstalling from public . This time makes sure it is loaded from private .
TEST_F(RExtensionLibraryApiTests, InstallPublicPrivate)
	{
		string libName = "assertthat";
		string version = "0.2.1";
		string zipFileName =
			sm_PublicDbIdUserIdPrefix + libName + "_" + version + x_FileExtension;
		fs::path pkgPath;
		pkgPath = sm_packagesSourcePath / x_OsName / zipFileName;
		EXPECT_TRUE(fs::exists(pkgPath));
		InstallAndTest(
			libName,
			pkgPath.string(),
			sm_publicLibraryPath,
			version);
		 Install same package in different context to see if it is loaded instead of public
		EXPECT_TRUE(fs::exists(pkgPath));
		InstallAndTest(
			libName,
			pkgPath.string(),
			sm_privateLibraryPath,  USE PRIVATE LIB PATH
			version);
		 Uninstall private then public, make sure we at least get the public after
		 uninstalling private.
		UninstallAndTest(libName, sm_privateLibraryPath, true);  otherInstallationExists
		UninstallAndTest(libName, sm_publicLibraryPath, false);
	}
TEST_F ( RExtensionLibraryApiTests , InstallPublicPrivate ) { string libName = " " ; string version = " " ; string zipFileName = sm_PublicDbIdUserIdPrefix + libName + " " + version + x_FileExtension ; fs :: path pkgPath ; pkgPath = sm_packagesSourcePath / x_OsName / zipFileName ; EXPECT_TRUE ( fs :: exists ( pkgPath ) ) ; InstallAndTest ( libName , pkgPath . string ( ) , sm_publicLibraryPath , version ) ; EXPECT_TRUE ( fs :: exists ( pkgPath ) ) ; InstallAndTest ( libName , pkgPath . string ( ) , sm_privateLibraryPath , version ) ; UninstallAndTest ( libName , sm_privateLibraryPath , true ) ; UninstallAndTest ( libName , sm_publicLibraryPath , false ) ; }
Name: InstallPublicPrivate
Description:
Installs package to public and makes sure its loaded from public path.
Name : InstallPublicPrivate Description : Installs package to public and makes sure its loaded from public path .
// First install in public path // // Install same package in different context to see if it is loaded instead of public // // USE PRIVATE LIB PATH // Uninstall private then public, make sure we at least get the public after // uninstalling private. // // otherInstallationExists