예제 #1
0
 static void Main(string[] args)
 {
     using (var host = new KnifeHost(args))
     {
         host.Run();
     }
 }
예제 #2
0
 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));
 }
예제 #3
0
 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());
 }
예제 #4
0
 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));
     }
 }