コード例 #1
0
        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);
        }
コード例 #3
0
        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);
        }