Example #1
0
        public Bundles_Test()
        {
            urlGenerator     = new Mock <IUrlGenerator>();
            referenceBuilder = new Mock <IReferenceBuilder>();
            bundleContainer  = new Mock <IBundleContainer>();
            application      = new TestableApplication(urlGenerator.Object, referenceBuilder.Object, bundleContainer.Object);

            CassetteApplicationContainer.SetAccessor(() => application);
        }
Example #2
0
        // This runs *after* Global.asax Application_Start.
// ReSharper disable UnusedMember.Global
        public static void PostApplicationStart()
// ReSharper restore UnusedMember.Global
        {
            _storage = IsolatedStorageFile.GetMachineStoreForAssembly(); // TODO: Check if this should be GetMachineStoreForApplication instead

            _configurations       = CreateConfigurations();
            _applicationContainer = GetSystemWebCompilationDebug()
                ? new CassetteApplicationContainer <CassetteApplication>(CreateCassetteApplication, HttpRuntime.AppDomainAppPath)
                : new CassetteApplicationContainer <CassetteApplication>(CreateCassetteApplication);

            CassetteHttpModule.GetApplication = () => _applicationContainer.Application;
            CassetteApplicationContainer.SetAccessor(() => _applicationContainer.Application);

            _applicationContainer.Initialize();
        }