Esempio n. 1
0
        public void SetEnvironmentInfo_NotWebJob_ReturnsExpectedResults()
        {
            Dictionary<string, string> environmentVariables = new Dictionary<string, string>();
            ProcessInfo processInfo = new ProcessInfo
            {
                EnvironmentVariables = environmentVariables
            };
            _controller.SetEnvironmentInfo(processInfo);

            Assert.False(processInfo.IsScmSite);
            Assert.False(processInfo.IsWebJob);
            Assert.Null(processInfo.Description);
        }
Esempio n. 2
0
        public void SetEnvironmentInfo_WebJob_ReturnsExpectedResults()
        {
            Dictionary<string, string> environmentVariables = new Dictionary<string, string>();
            environmentVariables.Add("APP_POOL_ID", "~1SCMPool");
            environmentVariables.Add("WEBJOBS_NAME", "TestJob");
            environmentVariables.Add("WEBJOBS_TYPE", "Continuous");
            ProcessInfo processInfo = new ProcessInfo
            {
                EnvironmentVariables = environmentVariables
            };
            _controller.SetEnvironmentInfo(processInfo);

            Assert.True(processInfo.IsScmSite);
            Assert.True(processInfo.IsWebJob);
            Assert.Equal("WebJob: TestJob, Type: Continuous", processInfo.Description);
        }