diff options
Diffstat (limited to 'main/tests/UnitTests/MonoDevelop.Projects/MSBuildTests.cs')
-rw-r--r-- | main/tests/UnitTests/MonoDevelop.Projects/MSBuildTests.cs | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/main/tests/UnitTests/MonoDevelop.Projects/MSBuildTests.cs b/main/tests/UnitTests/MonoDevelop.Projects/MSBuildTests.cs index 400476d20c..3ca18aefa0 100644 --- a/main/tests/UnitTests/MonoDevelop.Projects/MSBuildTests.cs +++ b/main/tests/UnitTests/MonoDevelop.Projects/MSBuildTests.cs @@ -44,6 +44,14 @@ namespace MonoDevelop.Projects [TestFixture] public class MSBuildTests : TestBase { + [TestFixtureSetUp] + public void SetUp () + { + string dir = Path.GetDirectoryName (typeof (Project).Assembly.Location); + Environment.SetEnvironmentVariable ("HHH", "EnvTest"); + Environment.SetEnvironmentVariable ("SOME_PLACE", dir); + } + [Test ()] public async Task LoadSaveBuildConsoleProject () { @@ -425,10 +433,6 @@ namespace MonoDevelop.Projects //[Ignore ("xbuild bug. It is not returning correct values for evaluated-items-without-condition list")] public async Task SaveItemsWithProperties () { - string dir = Path.GetDirectoryName (typeof (Project).Assembly.Location); - Environment.SetEnvironmentVariable ("HHH", "EnvTest"); - Environment.SetEnvironmentVariable ("SOME_PLACE", dir); - string solFile = Util.GetSampleProject ("property-evaluation-test", "property-evaluation-test.sln"); Solution sol = await Services.ProjectService.ReadWorkspaceItem (Util.GetMonitor (), solFile) as Solution; var p = (DotNetProject)sol.GetAllProjects ().First (); @@ -445,10 +449,6 @@ namespace MonoDevelop.Projects [Test] public async Task SaveItemsWithProperties2 () { - string dir = Path.GetDirectoryName (typeof (Project).Assembly.Location); - Environment.SetEnvironmentVariable ("HHH", "EnvTest"); - Environment.SetEnvironmentVariable ("SOME_PLACE", dir); - string projFile = Util.GetSampleProject ("property-save-test", "property-save-test.csproj"); Project p = await Services.ProjectService.ReadSolutionItem (Util.GetMonitor (), projFile) as Project; @@ -465,8 +465,6 @@ namespace MonoDevelop.Projects public async Task EvaluateProperties () { string dir = Path.GetDirectoryName (typeof (Project).Assembly.Location); - Environment.SetEnvironmentVariable ("HHH", "EnvTest"); - Environment.SetEnvironmentVariable ("SOME_PLACE", dir); string solFile = Util.GetSampleProject ("property-evaluation-test", "property-evaluation-test.sln"); Solution sol = await Services.ProjectService.ReadWorkspaceItem (Util.GetMonitor (), solFile) as Solution; @@ -499,10 +497,6 @@ namespace MonoDevelop.Projects [Test] public async Task EvaluatePropertiesWithConditionalGroup () { - string dir = Path.GetDirectoryName (typeof (Project).Assembly.Location); - Environment.SetEnvironmentVariable ("HHH", "EnvTest"); - Environment.SetEnvironmentVariable ("SOME_PLACE", dir); - string solFile = Util.GetSampleProject ("property-evaluation-test", "property-evaluation-test.sln"); Solution sol = await Services.ProjectService.ReadWorkspaceItem (Util.GetMonitor (), solFile) as Solution; var p = (DotNetProject)sol.GetAllProjects ().First (); |