Skip to content

Tests: Replace %TEMP% path hardcodings #307

Open
@savornicesei

Description

There are several places in unit tests where temporary path is hardcoded, for example:

  • project/UnitTests/Core/Config/PreprocessorTest.cs FAKE_ROOT
  • project/UnitTests/Core/IntegrationResultManagerTest.cs Assert.AreEqual(Platform.IsWindows ? @"c:\temp" : @"/tmp", result.WorkingDirectory);
  • project/UnitTests/Core/ProjectTest.cs Assert.AreEqual(Platform.IsWindows ? @"c:\temp" : @"/tmp", result.WorkingDirectory);

We can use Path.GetTempPath or the env. variables (see the remarks section in the link) to get the temp path without checking the platform.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions