public IEnumerator TestAddRemoveContent() { Assert.True(m_TargetContentPack != null, "Test content pack is not set."); // Remove the test pack if it already was installed ContentManagerDriver.UninstallContent(m_TargetContentPack); while (m_RemoveComplete != true) { yield return(null); } m_RemoveComplete = false; m_RemoveSuccess = false; // Add the test pack ContentManagerDriver.InstallContent(m_TargetContentPack); while (m_AddComplete != true) { yield return(null); } Assert.True(m_AddSuccess); ContentManagerDriver.UninstallContent(m_TargetContentPack); while (m_RemoveComplete != true) { yield return(null); } Assert.True(m_RemoveSuccess); yield return(null); }
public void Setup() { // Ensure the driver exists as setup can happen at odd points of loading var unused = ContentManagerDriver.Instance; ContentManagerDriver.SubscribeInstallCallback(ProcessAddResult); ContentManagerDriver.SubscribeUninstallCallback(ProcessRemoveResult); m_AddComplete = false; m_AddSuccess = false; m_RemoveComplete = false; m_RemoveSuccess = false; }
public void AfterAll() { ContentManagerDriver.UnsubscribeInstallCallback(ProcessAddResult); ContentManagerDriver.UnsubscribeInstallCallback(ProcessRemoveResult); }