Beispiel #1
0
        public void Warmup_Succeeds()
        {
            using (new TestEnvironment())
            {
                var settings = GetWebHostSettings();
                WebScriptHostManager.WarmUp(settings);

                var hostLogPath = Path.Combine(settings.LogPath, @"host");
                var hostLogFile = Directory.GetFiles(hostLogPath).First();
                var content     = File.ReadAllText(hostLogFile);

                Assert.Contains("Warm up started", content);
                Assert.Contains("Warm up succeeded", content);
            }
        }
Beispiel #2
0
        public async Task Warmup_Succeeds()
        {
            using (new TestEnvironment())
            {
                var settings         = GetWebHostSettings();
                var eventManagerMock = new Mock <IScriptEventManager>();
                await WebScriptHostManager.WarmUp(settings, eventManagerMock.Object);

                var hostLogPath = Path.Combine(settings.LogPath, @"host");
                var hostLogFile = Directory.GetFiles(hostLogPath).First();
                var content     = File.ReadAllText(hostLogFile);

                Assert.Contains("Warm up started", content);
                Assert.Contains("Executed 'Functions.Test-CSharp' (Succeeded, Id=", content);
                Assert.Contains("Warm up succeeded", content);
            }
        }