static void Main(string[] args) { using (var host = new KnifeHost(args)) { host.Run(); } }
public void ShouldRunOneStageServiceWhenRunStageTempWithAnyEnvironment() { using (var host = new KnifeHost(new[] { "Knife:Stage=temp" })) { host.Run(); } InvokeHistory.Instance.Count.Should().Be(1); InvokeHistory.Instance.First().Should().Be(typeof(TempStageInAllEnvironment)); }
public void ShouldRunOneStageServiceWhenRunStageTempWithAnyEnvironment() { using (var host = new KnifeHost(new[] { "Knife:Stage=temp" })) { host.Run(); } Assert.AreEqual(1, InvokeHistory.Instance.Count); Assert.AreEqual(typeof(TempStageInAllEnvironment), InvokeHistory.Instance.First()); }
public void ShouldRunTwoStageServiceWhenRunStageTempWithUatEnvironment() { using (Utility.WithDotnetEnv("uat")) { using (var host = new KnifeHost(new[] { "Knife:Stage=temp" })) { host.Run(); } InvokeHistory.Instance.Count.Should().Be(2); InvokeHistory.Instance.First().Should().Be(typeof(TempStageInUatEnvironment)); InvokeHistory.Instance.Last().Should().Be(typeof(TempStageInAllEnvironment)); } }