Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Tests: Replace %TEMP% path hardcodings #307

Description

@savornicesei

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

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