public virtual void Initialize()
        {
            AppDomain.CurrentDomain.SetData("DataDirectory", TestHelper.TestAppDataDirectory);

            var container = TestHelper.GetEmptyServiceContainer();

            var loader = new CoreBoot(container);

            loader.Boot();
        }
示例#2
0
        public void ActiveHasContainer()
        {
            //// Arrange
            var container = new Mock <IServiceContainer>();
            var loader    = new CoreBoot(container.Object);

            //// Act
            loader.Boot();

            //// Assert
            Assert.That(Active.Container, Is.Not.Null);
        }
        public void CoreBootHttpRuntimeCache()
        {
            //// Arrange
            var container = new ServiceContainer();

            var loader = new CoreBoot(container);

            //// Act
            loader.Boot();

            //// Assert
            Assert.That(Active.CacheManager, Is.Not.Null);
            Assert.That(Active.CacheManager.RuntimeCache, Is.Not.Null);
            Assert.That(Active.CacheManager.RuntimeCache.GetType(), Is.EqualTo(typeof(NullCacheProvider)));
        }
示例#4
0
        public void CompleteEvent()
        {
            //// Arrange
            var completeCalled = false;

            CoreBoot.Complete += (s, e) => { completeCalled = true; };

            var container = new Mock <IServiceContainer>();
            var loader    = new CoreBoot(container.Object);

            //// Act
            loader.Boot();


            //// Assert
            Assert.That(completeCalled, Is.True);
        }