Example #1
0
        IHostingService GetManagedService(out AddressableAssetSettings settings)
        {
            var m = new HostingServicesManager();

            settings = AddressableAssetSettings.Create(k_TestConfigFolder, k_TestConfigName, false, false);
            settings.HostingServicesManager = m;
            var group = settings.CreateGroup("testGroup", false, false, false, null);

            group.AddSchema <BundledAssetGroupSchema>();
            settings.groups.Add(group);
            m.Initialize(settings);
            return(m.AddHostingService(m_Service.GetType(), "test"));
        }
        public void HostingServicesShould_ReturnListOfManagedServices()
        {
            m_Manager.Initialize(m_Settings);
            Assert.NotNull(m_Manager.HostingServices);
            Assert.IsEmpty(m_Manager.HostingServices);
            var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test");

            Assert.IsTrue(m_Manager.HostingServices.Contains(svc));
        }