示例#1
0
 public void TestIsReleassEnvironment()
 {
     EnvironmentTool.SetEnviroment("Release");
     Assert.IsFalse(EnvironmentTool.IsTestEnvironment);
     Assert.IsFalse(EnvironmentTool.IsDevelopmentEnvironment);
     Assert.IsTrue(EnvironmentTool.IsReleassEnvironment);
 }
示例#2
0
        public void TestSetEnviroment(string environment)
        {
            EnvironmentTool.SetEnviroment(environment);
            var e = Environment.GetEnvironmentVariable("DOTNETCORE_ENVIRONMENT");

            Assert.AreEqual(environment, e);
        }
示例#3
0
 public static void ClassInitialize(TestContext context)
 {
     EnvironmentTool.SetEnviroment("Test");
 }